Will you only be creating one type of object? or multiple types?

If its just one, then myFactory.getDrag() can create and return the object..but im guessing thats not the case or you wouldnt be asking :)

so, you could return a string of the full class name (including its package) and assuming that any class you want to create implements the same interface so you can rely on some type information further down the line, you could try :

String className = myFactory.getDrag();
IDrag drag = new _global[className]();


[EMAIL PROTECTED] wrote:
I have a class named Drag with a static function create.
A drag is created as :  Drag.create(...)

Now I would like to use a Factory to return a drag, but the problem is
that the Factory has to return the class Drag instead of an instance of
Drag...

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to