Hi, A have a Factory that needs to instanciate Objects with differing numbers of parameters (1-4). Is there any way to deal with this situation and maintain strong typing.
private function createItem(param_ob:Object, key:String):Void{ switch(key){ case "item_1": myItem = new Item_1(param_ob.width, param_ob.y); break case "item2": myItem = new Item_2(param_ob.height, param_ob.color); break etc... } } _______________________________________________ Flashcoders@chattyfig.figleaf.com 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