Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting up appication objects
Message
De
10/02/2003 15:51:21
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00751147
Message ID:
00751620
Vues:
14
>Does it matter where I use this code in My App or where I call it from.
>
>i.e. Does it have to be set up in the top most prg program ?

An application object is generally used to package a set of properties and methods that will be used on an application wide basis; therefore, you would create it before any other functions attempted to access it, usually before your main READ EVENTS loop.

So that your application object does not go out of scope (by accident or due to an error), you would normally assign it to a PUBLIC variable or attach it to the _SCREEN object.

The beauty of the application object is that even if you created it initially in the "wrong" place, you can easily move the CREATEOBJECT/NEWOBJECT statement vs having to cut, copy and paste a whole bunch of "non-object" variable declarations and assignments.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform