Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SCOPE TO WHAT
Message
 
À
21/03/1997 01:12:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00025094
Message ID:
00025148
Vues:
35
>>>*!* DEFINE CLASS app AS custom
>>>*!* *-- usr.usrcode
>>>*!* usrcode = ""
>>>*!* deflt_drive = ""
>>>*!* usr_drive = ""
>>>*!* global_drive = ""
>>>*!* who_are_developers = "GBERGER^ADMIN^SYSMGBER^SYSMMFRY^SYSMLLAM^"
>>>*!* Name = "app"
>>>*!* ENDDEFINE
>>>
>>>SET CLASSLIB TO m:\common\app && <---- The code above
>>>oApp=CREATEOBJECT("app")
>>>
>>>WITH oApp
>>> .USRCODE =SPACE(10)
>>> .DEFLT_DRIVE ="M"
>>> .USR_DRIVE ="C"
>>> .GLOBAL_DRIVE ="Z"
>>> .WHO_ARE_DEVELOPERS = "GBERGER^ADMIN^SYSMGBER^"
>>>ENDWITH
>>>
>>>*!* Since my first user program:
>>>*!* 1) Defines global variables and "SET" command
>>>*!* 2) Runs the above code (classlib stuff)
>>>*!* 3) Runs a menu
>>>
>>>*!* How do I prevent oApp object from going out of scope
>>>*!* as soon as the program finishes?
>>
>>
>>Create a Public variable named 'oApp'! (s)
>>
>>Tom
>
>I know what you mean by public variable ... so do you mean like this: ?
>
>PUBLIC oApp
>oApp=CreateObject("app")


YUP! (s)

Tom
Tom
--------------------------------
Tom O'Hare
407-299-4268 -- tom@redtile.com -- http://www.redtile.com/
Independent Programmer Using Visual FoxPro, Visual Basic & more...
Operations Manager -- Virtual FoxPro User Group (VFUG)
http://www.vfug.org/ -- tom@vfug.org
President -- Central Florida FoxPro User Group (CFFUG)
http://www.redtile.com/foxpro/
Universal Thread Most Valued Professional (MVP)
http://www.transformation.com/foxpro/
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform