On Nov 27, 2008, at 5:25 PM, Bart Silverstrim wrote:
Tim Jones wrote:
On Nov 27, 2008, at 8:58 AM, Bart Silverstrim wrote:
I tried putting in a global constant in my primary window with
Add Constant and set the global scope, but when I tried setting
it in another window's static text with
thatstaticbox.setString = constAppName + "More Text"
compiles fail at constAppName, so I'm suspecting that the global
constant is only accessible in the window it's declared in,
despite being global?
You'll need to refer to it as window.constAppName.
I knew it was something simple I was overlooking.
Or, you could create a global module (I call mine AppGlobals) and
place any application global properties, constants, classes, and
methods there.
Another idea I'll keep in mind, thank you!
And thank you to everyone else who replied with these ideas too!
Another place that is global is the App subclass. Your constant needs
to be addressed with the prefix "App." but they are application wide
and last for the lifetime of the application. A module is most
common, for a long time, was the only way to create a constant other
than a local (Const) one.
Terry
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|