Originally Posted by maskedMan
I did eventually try something like that, and it worked for a time. Problem was that it still didn't know its own base class if you used things like getChildAt(x) to retrieve it... so I took a little bit from Acolyte's example and created a recasting utility that basically accepts any object and returns it cast as its classname. Absolutely useless in most cases, but absolutely awesome if you are trying to stick an interface into a display list, or retrieve from said display list and immediately invoke a function or assign a variable.
I then took it a step further and added the recasting utility to a second utility that creates new instances of objects you pass to it. It has as function for making just default instances, a different function that accepts objects implementing an IClonable interface that allows the object that is to be coppied to be responsible for setting all of its relevant data in its clone before the clone is returned by the utility. It's a primitive, but in all the cases I need it effective way of duplicating display objects.
Wow that sound nice maskedman i like to organize my mediator like this what is most of the time a subclass of my view if you dont care i would love to see wht you found out about this topic
so it would be cool if you could upload a example maybee ?
What is a good rehearsal maybee for realy getting a crasp what
factory is doing infact i would recommend checking out steven sacks awesome gaiaflashframework what is one of a big factory .
If you follow the framework flow you will recognize that it is the factory what is abstracting away complexity what if you know what is all about with this strange word "consultancy" :| could be worth something if you are forced to work with nasty stinky sphagetticoders.