Without testing, i'm pretty sure even parentApplication refers to
Application so you might be out of luck.
You could have a shell singleton and then register each module
singleton via a string reference.
so you could use something like var s:ModuleSingleton =
ShellSingleton.getInstance().getSingleton('module1');
registerSingleton();
removeSingleton();
hasSingleton();
Thats one solution, perhaps not the most elegant.
Bjorn
On 17/05/2007, at 7:49 AM, passive_thoughts wrote:
To create 'global' variables in flex without resorting to using a
singleton, the 'recommended way' seems to be using public variables in
the <mx:application> and then accessing them via
Application.application, as outlined here
http://livedocs.macromedia.com/flex/2/docs/00000843.html
When using modules, Application.application will always refer to the
shell application not to <mx:module>....has anyone figured out how to
create quasi module scoped global variables? (I can't use a singleton
since I will be loading multiple instances of the same module)
V