Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CreateObject() vs. NewObject() functions
Message
De
15/12/2008 09:15:15
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01367158
Message ID:
01367419
Vues:
9
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform