It's a workaround that someone suggested on the list earlier.  Because users
can drag and drop our components in some cases they were getting
instantiated without the static variable being set so they suggested
throwing in that as a way of preventing double instantiation.

I had MyManager declared and in my variable declaration chunk up top but had
not added in the last part(=null)

private static var _myManager : MyManager;

I'm going to try changing that and see how if that helps.


Mani



On 2/20/06, Morten Barklund TBWAPlay <[EMAIL PROTECTED]> wrote:
>
> Manuel Saint-Victor wrote:
> >         if(_myManager==null){
>
> Nothing is null, unless explicitly set to null.
>
> And why do you check for the existence of the staticly set _myManager
> both in the static singleton-accessor and in the constructor - one of
> them should be enough.
>
> --
> Morten Barklund - Information Architect - TBWA\Play
> Gothersgade 49, 4th floor - DK-1123 Copenhagen K, Denmark
> Phone: +45 7027 2227 - Fax: +45 3369 1174
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to