My first question would be why do you want to remove the singleton and its references?
I think your original method is much better than the new one you are trying to do
The Application object is a singleton and already has reference to its child elements. Seems like by creating the singleton, I am creating an extra class to simply hold some references to objects that already have a reference.
I am kinda confused as to why I can do
private var h:ViewHDDComp= HDDGlobals.getInstance().ViewHDD;
private var h:ViewHDDComp=FlexGlobals.topLevelApplication.viewHDD;
I'm trying to condense my code a bit for readability and make memory improvements when possible.
hmm...Should I do a getInstance within the mxml component and reference it with:
private var h:ViewHDDComp=FlexGlobals.topLevelApplication.viewHDD.getInstance()
Why do you think the singleton is better than the FlexGlobals.topLevelApplication? Just curious.
I have to say im not exactly sure
It’s interesting actually, Ive never really thought of doing it your way.
As it happens Im just about to go to bed, the perfect place to ponder on the question. J
I’ll have a look in the morning and try accessing some stuff the FlexGlobals way, and see how it works out.
I think Ive only ever referenced FlexGlobals.tLA when using it to position a pop up window.
Off the top of my head im not sure why your code isn’t working. It looks like it should
Anyway, I’ll have a look in the morning
Good luck and nice to speak to you
Cool... I appreciate the input Glenn. Thanks