PDA

View Full Version : mx:Component vs. ClassFactory


jimmy5804
03-04-2008, 07:33 AM
I have an item renderer that works fine in MXML when encapsulated by a <mx:Component> tag. However, I get a "Type Coercion failed" error if I try to cast the same item renderer to ClassFactory (or IFactory) in AS. What magic does the Component tag do in this regard that the cast doesn't?

Thanks.

jimmy5804
03-04-2008, 07:39 AM
Ok... I'm calling "moron" on myself. It's not supposed to be a cast, it's creation of a new ClassFactory object.