flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: ItemRenderer declaration in MXML
Date Sun, 20 Jul 2014 07:26:49 GMT
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" <vincent@after24.net> wrote:

>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 :
>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
>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
>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:
>Sent from the Apache Flex Users mailing list archive at Nabble.com.

View raw message