I have a TileList with a custom item renderer.
I need to change the children of the ItemRenderer when the dataprovider changes for the TileList.
Currently,
override protected function createChildren():void{
Works fine with the inital data, but when 开发者_如何学Gothe data changes to a different structure I need to recreate the children somehow.
I image there has to be a way to listen to the TileList for a data change from inside the item renderer, but how? Or is that even the best route to go?
maybe this will do the job :
override public function set data( value : Object ) : void
{
super.data = value;
// things to happend when data is changed ...
}
aswell maybe updateDisplayList() shall need to be overrided aswell to match the changes with the visual components ( if there is ).
精彩评论