Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting up appication objects
Message
From
10/02/2003 15:51:21
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00751147
Message ID:
00751620
Views:
21
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform