Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need hook to define paths
Message
 
To
08/04/2004 12:43:29
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
General information
Forum:
Visual FoxPro
Category:
Project manager
Miscellaneous
Thread ID:
00893292
Message ID:
00893347
Views:
19
James
I guess I should have said I am in VFP6. I don't think I have access to project properties. I assume that is where you get "ActiveProject.HomeDir" from.

>Chuck
>
>This is what I do. I change the dir in foxpro to the project home dir.
>
>
>IF TYPE("_vfp.ActiveProject.name")<> "U"
>	lcHomeDir = _vfp.ActiveProject.HomeDir
>	CD (lcHomeDir)
>	_screen.Caption = "Microsoft Visual Foxpro " +_vfp.ActiveProject.name
>ENDIF 	
>
>
>
>>I could use some help with creating a projecthook that will set the default path and set path to default folders.
>>I am currently using the following code but I cannot catch the directory the project is opened from. Variables come in empty.
>>
>>
>>DEFINE CLASS projectpath AS projecthook
>>
>>	Height = 22
>>	Width = 23
>>	Name = "projectpath"
>>
>>	PROCEDURE Destroy
>>		set default to "O:\"
>>		set path to
>>	ENDPROC
>>
>>	PROCEDURE Init
>>		local lcDir,lcProjDir
>>		lcDir = allt(sys(5)+curdir())
>>		lcProjDir = allt(substr(curdir(),1,at('\',curdir(),2)-1))
>>		set default to &lcDir
>>		set path to "class,data,forms,icons,reports,help,prog,o:\"+lcProjDir+"\source\a blank oapp\class"
>>	ENDPROC
>>ENDDEFINE
>>
Extreme Programming = Plan -> Design -> Code -> Test
Previous
Reply
Map
View

Click here to load this message in the networking platform