Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CreateObject() vs. NewObject() functions
Message
From
15/12/2008 09:15:15
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01367158
Message ID:
01367419
Views:
10
>Hi Charlie, thanks that is an idea, the environment manager.

Here's something I run from the environment manager's script - passing the project's name as a parameter:
*++
*[2007/02/22 09:10:05] dragan - for oddball paths, set path to available paths in the project.
*[2007/02/23 16:00:53] dragan - no need to have the pjx open
*[2007/02/26 10:48:59] dragan - added the parameter
*--

LPARAMETERS tcPjx

DO CASE
CASE _vfp.Projects.Count>0
	oPjx=_vfp.Projects[1]
	lcPjx=oPjx.Name
CASE PCOUNT()>0
	lcPjx=DEFAULTEXT(tcPjx, "pjx")
OTHERWISE
	lcPjx= (Getfile("pjx"))
ENDCASE

If !Empty(lcPjx)
	Use (lcPjx) In 0 Alias pjx Shared Again Noupdate
	Select Distinct PADR(Justpath(Name),100) ;
		FROM pjx ;
		INTO Array aPaths
	For i= 1 To Alen(aPaths)
		Do addpath With aPaths[i]
	Endfor
	Use In Select("pjx")
Endif

proc addpath
	lparam cPath
	try
		cPath=fullp(addbs(cPath))

		if dire(cPath)
			if atc(cPath+',', set('path')+',')=0
				cPath=set('path')+','+cPath
				set path to (cPath)
			endif
		endif
	catch to oEx
		assert .f. message oEx.message
	endtry

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform