I'm stumped. I'm trying to create a singleton class that is also an MXML
class.
creates one instance obviously. But another
class needs to reference this class. So class 2 calls
SingletonClass.getInstance(). It's possible that class 2 will be created
before the MXML SingletonClass instance.
It's
You should probably implement the IMXMLObject interface. Override the
initialized method where you can set the class instance (to 'this').
The getInstance() method can create a default class instance if it's null
and return it.
Don't save references to the class instance in the classes that need
Yay! That's the class I needed! :)
To answer your question why. First I like to use MXML. Any tool can parse
XML. Plus, with this class, I plan to drop it into all my future project and
set properties on it. If I had more than one instance it would screw up the
application. Other classes use some
- Original Message -
From: dorkie dork from dorktown
To: flexcoders@yahoogroups.com
Sent: Sunday, January 11, 2009 5:05 AM
Subject: Re: [flexcoders]Need help creating a Singleton with MXML
Yay! That's the class I needed! :)
To answer your question why. First I like t
4 matches
Mail list logo