*++ >*[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 >*[2010/03/26 20:40:37] ndragan - IN SELECT("pjx") >*[2012/08/01 14:21:12] ndragan - use... alias, so it closes for real. >*-- > >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) >*[2012/05/29 13:46:39] ndragan - non-local paths go in the end >*[2013/12/09 15:00:32] nDragan - and the home folder may be foreign, ignore. > SELECT 0 > USE (lcPjx) alias pjx AGAIN > SELECT DISTINCT PADR(JUSTPATH(NAME),100) ; > FROM pjx ; > WHERE NOT "..\"$NAME ; > and type#"H"; > INTO ARRAY aPaths > FOR i= 1 TO ALEN(aPaths) > DO addpath WITH aPaths[i] > ENDFOR > RELEASE aPaths > SELECT DISTINCT PADR(JUSTPATH(NAME),100) ; > FROM pjx ; > WHERE "..\"$NAME ; > INTO ARRAY aPaths > IF _TALLY>0 > FOR i= 1 TO ALEN(aPaths) > DO addpath WITH aPaths[i] > ENDFOR > ENDIF >ENDIF >USE IN SELECT("pjx") > >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 >>