The column width and rowHeight are set dynamically when the components looks at 
the config details (how big is the pic, how many rows/columns should it be 
broken up into.)

Finn pointed me in the right direction--the dynamically generated images. I was 
storing all the images in the menu as an array of Bitmaps, the retrieving them 
in the renderer and assigning them to myImage source.

When 1) created a bitmap in the renderer and bound myImage.source to it, and 2) 
generated BitmapDatas in the component which are retrieved by the renderer and 
assigned to the bitmap...voila, it worked perfectly. 

Why it worked, I do not know. In the future I think I'll superstitiously tend 
toward associating Bitmaps with Images, then updating the bitmapData on the 
Bitmap, rather than resetting the Image source--at least in renderers.

Thx James and Alex.

--- In flexcoders@yahoogroups.com, Alex Harui <aha...@...> wrote:
>
> Have you set columnWIdth/rowHeight explicitly?  I wouldn't let the TileList 
> measure the renderer and decide for itself.
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of mattgarland2000
> Sent: Tuesday, November 17, 2009 11:13 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] first tile of tilelist does not show up
> 
> 
> 
> 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