General information
Category:
Coding, syntax & commands
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only