Re: [flexcoders] Subclassing TileList breaks my code!?
Change it to treeline:itemRenderer. Best Regards, ...aaron On 11/17/07, quiet.mountain [EMAIL PROTECTED] wrote: Hi all, This TileList was working fine: mx:TileList id=allYarnsTL dataProvider={allYarnsAC} mx:itemRenderer mx:Component mx:Canvas mx:Image id=yarnImage source={data.image}/ /mx:Canvas /mx:Component /mx:itemRenderer /mx:TileList I then needed to override some TileList behaviours. So I started to subclass TileList... package com.treelinerugs { import mx.controls.TileList; public class TestTileList extends TileList { public function TestTileList() { super(); } } } and then created an instance as before... treeline:TestTileList id=allYarnsTL dataProvider={allYarnsAC} mx:itemRenderer mx:Component mx:Canvas mx:Image id=yarnImage source={data.image}/ /mx:Canvas /mx:Component /mx:itemRenderer /treeline:TestTileList But now I get a compile-time error Could not resolve mx:itemRenderer to a component implementation. I can fix this by creating a separate component and creating the instance like this instead: treeline:TestTileList id=allYarnsTL dataProvider={allYarnsAC} itemRenderer=com.treelinerugs.TLItemRenderer Why can't I define the itemRenderer in-line if I subclass TileList? Thanks, Rich -- Aaron Miller Chief Technology Officer Splash Labs, LLC. [EMAIL PROTECTED] | 206-328-5485 http://www.splashlabs.com
[flexcoders] Subclassing TileList breaks my code!?
Hi all, This TileList was working fine: mx:TileList id=allYarnsTL dataProvider={allYarnsAC} mx:itemRenderer mx:Component mx:Canvas mx:Image id=yarnImage source={data.image}/ /mx:Canvas /mx:Component /mx:itemRenderer /mx:TileList I then needed to override some TileList behaviours. So I started to subclass TileList... package com.treelinerugs { import mx.controls.TileList; public class TestTileList extends TileList { public function TestTileList() { super(); } } } and then created an instance as before... treeline:TestTileList id=allYarnsTL dataProvider={allYarnsAC} mx:itemRenderer mx:Component mx:Canvas mx:Image id=yarnImage source={data.image}/ /mx:Canvas /mx:Component /mx:itemRenderer /treeline:TestTileList But now I get a compile-time error Could not resolve mx:itemRenderer to a component implementation. I can fix this by creating a separate component and creating the instance like this instead: treeline:TestTileList id=allYarnsTL dataProvider={allYarnsAC} itemRenderer=com.treelinerugs.TLItemRenderer Why can't I define the itemRenderer in-line if I subclass TileList? Thanks, Rich
RE: [flexcoders] Subclassing TileList breaks my code!?
The properties of a component are in the namespace of the component, so you would use treeline:itemRenderer From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of quiet.mountain Sent: Saturday, November 17, 2007 1:31 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Subclassing TileList breaks my code!? Hi all, This TileList was working fine: mx:TileList id=allYarnsTL dataProvider={allYarnsAC} mx:itemRenderer mx:Component mx:Canvas mx:Image id=yarnImage source={data.image}/ /mx:Canvas /mx:Component /mx:itemRenderer /mx:TileList I then needed to override some TileList behaviours. So I started to subclass TileList... package com.treelinerugs { import mx.controls.TileList; public class TestTileList extends TileList { public function TestTileList() { super(); } } } and then created an instance as before... treeline:TestTileList id=allYarnsTL dataProvider={allYarnsAC} mx:itemRenderer mx:Component mx:Canvas mx:Image id=yarnImage source={data.image}/ /mx:Canvas /mx:Component /mx:itemRenderer /treeline:TestTileList But now I get a compile-time error Could not resolve mx:itemRenderer to a component implementation. I can fix this by creating a separate component and creating the instance like this instead: treeline:TestTileList id=allYarnsTL dataProvider={allYarnsAC} itemRenderer=com.treelinerugs.TLItemRenderer Why can't I define the itemRenderer in-line if I subclass TileList? Thanks, Rich