How do you use your class? I think, I'll add a new macro (say, F7):
cd ?
modi proj ?
Or I can create a program called InvokeProject, which will receive ProjectName as a parameter. However, I'm not sure, how this program would now the path to the project. Of course, I can use two parameters, but it seems like too much typing...
>>Well, I don't really see how highlighting the lines and pressing enter would make CTRL-F & CTRL-W work improperly...unless you have a project hook doing something to affect it. On my machine (VFP6), if I hilite those 2 lines run them together, the project closes as soon as I click back into the command window.
>>
>>So I avoid running the project manager that way...
>
>I rather have a shortcut to the project and open it with a doubleclick, or (preferrably, since I usually work on more than one project at a time) use the following project hook, which does just two things: CDs to the project's home directory and sets the path to include the directories of all the components.
>
>
>*-- Class: pjx (e:\dragan\dokumenti\rad\vfprc\app.vcx)
>*-- ParentClass: projecthook
>*-- BaseClass: projecthook
>*-- Time Stamp: 11/15/01 04:13:07 PM
>*
>#INCLUDE "d:\program files\microsoft visual studio\vfp98\foxpro.h"
>*
>DEFINE CLASS pjx AS projecthook
>
> Height = 22
> Width = 23
> Name = "pjx"
>
>
> PROCEDURE addpath
> lParam cPath
> cPath=fullp(cPath)
> if atc(cPath+',', set('path')+',')=0
> cPath=set('path')+','+cPath
> set path to (cPath)
> endif
> ENDPROC
>
>
> PROCEDURE Init
> dodefault()
> local oPjx
> oPjx=_vfp.activeproject
> cd (oPjx.homedir)
> this.addpath(justpath(this.classlibrary))
> use (oPjx.name) again in 0 noup alias pjx
> select dist (justpath(name)) from pjx into array aa
> *use in pjx
> for i=1 to alen(aa)
> this.addpath(trim(aa[i]))
> endfor
> SELECT pjx
> USE
> ENDPROC
>
>
>ENDDEFINE
>*
>*-- EndDefine: pjx
>**************************************************
>
If it's not broken, fix it until it is.
My Blog