The solution....
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas
xmlns:mx="http://www.adobe.com/2006/mxml"
width="200" height="50">
<mx:Script>
<![CDATA[
override protected function commitProperties():void
{
super.commitProperties()
if (data)
{
// uncomment to see this actually work
// setStyle("backgroundColor", 0xFF0000);
// imaginary prop
if (data.itemColor is Number)
setStyle("backgroundColor", data.itemColor);
}
}
]]>
</mx:Script>
<mx:Label x="10" y="10" text="{data.label}"/>
</mx:Canvas>
Mike
On Tue, Jun 3, 2008 at 10:36 AM, Michael Schmalle <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> The reason this is not working with TypeSelectors is because the styleName
> property of the item renderer is getting set to the LisContentHolder
> instance (it's parent).
>
> Mike
>
>
> On Tue, Jun 3, 2008 at 9:49 AM, Amy <[EMAIL PROTECTED]> wrote:
>
>> --- In [email protected] <flexcoders%40yahoogroups.com>, "Josh
>> McDonald" <[EMAIL PROTECTED]> wrote:
>> >
>> > Can you post the code for TestRenderer?
>>
>> Are you sure? It's very complicated ;-)
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="200"
>> height="50">
>> <mx:Label x="10" y="10" text="{data}"/>
>>
>> </mx:Canvas>
>>
>>
>>
>
>
>
> --
> Teoti Graphix, LLC
> http://www.teotigraphix.com
>
> Teoti Graphix Blog
>
> http://www.blog.teotigraphix.com
>
> You can find more by solving the problem then by 'asking the question'.
>
--
Teoti Graphix, LLC
http://www.teotigraphix.com
Teoti Graphix Blog
http://www.blog.teotigraphix.com
You can find more by solving the problem then by 'asking the question'.