Without looking, I think any Ifactory results in wrapping by ClassFactory. Try it and let us know if it doesn't work.
On 7/19/14 4:08 AM, "After24" <[email protected]> wrote: >Hello, > >I'm building a custom component with an itemRenderer public property : > >public function get itemRenderer():IFactory >{ > return _itemRenderer; >} > >public function set itemRenderer(value:IFactory):void >{ > _itemRenderer = value; > ..... >} > >So the setter is waiting for an IFactory. > >In MXML, for components like spark List or Datagrid, the itemRenderer >property can be set with the following declaration : >itemRenderer="com.foo.ItemRenderClass" > >I would like to understand the mechanism that allow the conversion of the >String into an IFactory. >I guess the compiler checks if com.foo.ItemRenderClass exists and, if >true, >returns a new ClassFactory(ItemRenderClass) ? > >Is it possible to get the same behavior with a custom component, I mean >having the possibility to use a classPath String in MXML while the setter >of >the property is waiting for a different type (like an Ifactory in my >case) ? >is it based on Metadata ? > >Thank you. > > > >-- >View this message in context: >http://apache-flex-users.2333346.n4.nabble.com/ItemRenderer-declaration-in >-MXML-tp7339.html >Sent from the Apache Flex Users mailing list archive at Nabble.com.
