Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Framework Problem with file locations
Message
De
20/07/1999 06:11:35
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Framework Problem with file locations
Divers
Thread ID:
00243482
Message ID:
00243482
Vues:
57
I created an application using the framework and now I am getting this error
message: "File not found, or unavailable. It may be in use _App "

I use this "setpath" function to set the default directory for the
application depending on where the user decided to install the files:

IF SETPATH()
SET PATH TO ;DATA;INCLUDE;FORMS;GRAPHICS;HELP;LIBS;MENUS;PROGS;REPORTS
ENDIF

FUNCTION SETPATH()
LOCAL lcSys16, ;
lcProgram

lcSys16 = SYS(16)
lcProgram = SUBSTR(lcSys16, AT(":", lcSys16) - 1)

CD LEFT(lcProgram, RAT("\", lcProgram))
*-- If we are running MAIN.PRG directly, then
*-- CD up to the parent directory
IF RIGHT(lcProgram, 3) = "FXP"
CD ..
ENDIF
SET PATH TO PROGS, FORMS, LIBS, ;
MENUS, DATA, OTHER, ;
REPORTS, INCLUDE, HELP, ;
BITMAPS
SET CLASSLIB TO test_app ADDITIVE **** test_app is the application class
created by the framework
RETURN
ENDFUNC

I also set the class library to the application class. When I run the
program I still get the error that the file _App cannot be found. When I
select ok with the error message the application runs okay after that. I
found away to get arround this by copying all the class libraries to my
"LIBS" directory as indicated below:

IF SETPATH()
SET PATH TO ;DATA;INCLUDE;FORMS;GRAPHICS;HELP;LIBS;MENUS;PROGS;REPORTS
ENDIF

and this works fine and I don't get the error message, but I think there
must be a more efficient way to get around this, i even try setting the
default file search path using the "option" tab. Can any one help me with
this problem.

Regards
Patrick
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform