I mean like this: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<managers:MyBadPracticesClass /> </mx:Application> If it was a display object all the suggestions would work but it extends EventDispatcher and manages states, etc. The problem was that the id was not getting set. It also was not enumerated when I looped through the application. What I had to do was implement the IMXMLObject interface. This notified the application to call an initialized function that passed in a reference to the document (application) and id of the instance both of which are not present when you extend EventDispatcher or Object. I did this so that I could make it behave like a singleton. But it's all working now in bad practices land. :P Paul, this is a reincarnation of the other question (posted before it was solved). On Mon, Jan 12, 2009 at 12:52 AM, Haykel BEN JEMIA <hayke...@gmail.com>wrote: > I have to ask again: What do you mean with "on the application"? > I you mean added to some display list, then it must be a subclass of > DisplayObject. > Or perhaps you can tell what you want to do exactly. > > Haykel Ben Jemia > > Allmas > Web & RIA Development > http://www.allmas-tn.com > > > > > On Sun, Jan 11, 2009 at 5:42 AM, dorkie dork from dorktown < > dorkiedorkfromdorkt...@gmail.com> wrote: > >> It's a manager class that extends EventDispatcher. >> >> On Sat, Jan 10, 2009 at 12:17 AM, Haykel BEN JEMIA <hayke...@gmail.com>wrote: >> >>> What do you mean with "on the application"? >>> If you mean added to the stage, then you can't find this out in the >>> constructor. Make sure your class is a subclass of DisplayObject and listen >>> to the "added" or "addedToStage" events. >>> >>> >>> Haykel Ben Jemia >>> >>> Allmas >>> Web & RIA Development >>> http://www.allmas-tn.com >>> >>> >>> >>> >>> >>> On Sat, Jan 10, 2009 at 7:06 AM, dorkie dork from dorktown < >>> dorkiedorkfromdorkt...@gmail.com> wrote: >>> >>>> I have a class on the application like this: >>>> >>>> <managers:MyClass /> >>>> >>>> How do I find out inside that class in the constructor if that class is >>>> on the Application? >>>> >>>> dorkie dork from dorktown™ >>>> >>> >>> >> > >