I have a component which breaks up a picture into a tilelist. It works great, 
except, the first picture does not show up.

The renderer is a canvas with an image (subclasses add other images). It grabs 
the appropriate image from the parent component. (This image is dynamically 
created from a loaded image). 

Here is the renderer:

        override public function set data(value:Object):void
                        {
                                _data=value;
                                invalidateProperties();
                                dispatchEvent(new 
FlexEvent(FlexEvent.DATA_CHANGE));
                        }

                        [Bindable("dataChange")]
                        override public function get data():Object
                        {
                                return _data;
                        }

                        [Bindable("dataChange")]
                        public function get listData():BaseListData
                        {
                                return _listData;
                        }

                        public function set listData(value:BaseListData):void
                        {
                                _listData=value;
                                list=listData.owner as TilePicture;
                        }

                        protected function setImage():void
                        {
                                image.source=list.imageFromRenderer(this);
                        }

                        override protected function 
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
                        {
                                super.updateDisplayList(this.unscaledWidth, 
this.unscaledHeight);
                                setImage();
                        }

Things I have tried:

1) in the parent, resetting the dp to force an update
2) forcing an update via dataChange
3) binding the image's source

These don't work. Not sure what to try next. Occasionaly and unpredictably, the 
image will update when 1) in a subclassed renderer, a second image is changed. 
But usually no amount of  interaction will make the first tile appear. 

Reply via email to