Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Path Issue
Message
 
 
À
28/01/2003 15:08:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de projet
Titre:
Divers
Thread ID:
00746395
Message ID:
00746445
Vues:
20
Use SET PATH Command, here a sample of how can you do it:
** Change to the Directory where the Main is located
CD (JUSTPATH(SYS(16)))

lcPath = CURDIR()

lcPathForm = lcPath+"Forms\"
lcPathLibs = lcPath+"Libs\"
lcPathData = lcPath+"Data\"

SET PATH TO &lcPathForm, &lcPathLibs, &lcPathData
SET CLASSLIB to MainClass ADDITIVE

DO FORM Main
About your second question, you can't control Toolbar because there's an SCOPE issue, the oToolBars seems like an LOCAL variable and only Start.prg can "see it". You can avoid this just declaring oToolBar as PUBLIC.


>In the start.prg of my program I have the following code.

>DO FORM CURDIR()+ "Forms\Main.SCX"
>SET CLASSLIB TO CURDIR() + "Libs\MainClass" ADDITIVE

>oToolbar = CREATEOBJECT("Toolbar1")
>oToolbar.Show
>oToolbar.Dock(0)

>READ Events

>Question 1. Is there a way that I can remove the CURDIR() from the code and prevent the program from crashing? Do I need to setup the path name somewhere to prevent this from happening?

>Question 2. In the main form (Main.Scx), why can't I control the oToolbar in the init() event? Visual FoxPro is telling it does not exist, Why? All I want to do is disable two buttons initially.

>Thanks in Advance.
Apoya a Visual FoxPro usandolo legalmente
--
¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º
Espartaco Palma Martínez
SysOp PortalFox
http://www.portalfox.com
esparta@portalfox.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform