Sorry to be obtuse, but this is still giving me problems...

(BTW Many thanks Alex for looking into the image issue, that's very  
helpful)

So I have a renderer that will have a few textfields, and I want to  
extend ListItemRenderer. The rows will be of different heights due to  
different amounts of text in the textfields, and the item renderer  
should not display a scrollbar of any kind. My questions:

1) Where should I set the ".text" values for my textfields--that is,  
what actually displays? Do I set it in set data() or in  
commitProperties()?

2) How much of ListItemRenderer's methods should I override? It looks  
like I need to do most of them--createChildren() to create my  
textfields, commitProperties() to set all their values (or do I--see  
1), measure() to get the sizes, updateDisplayList() to lay everything  
out, and get and set data(). Do I need to call super.methodName() on  
all these? If so, what does extending ListItemRenderer get me that I  
couldn't get by writing a custom UIComponent?

3) I had been thinking of get and set data() as ways of referring to  
the object being listed, where _data is an instance of the value  
object I am listing. Is this right? What is listData?

Thanks for not having called me a dumbass so far, at least not out loud,

OK
DAH


On Sep 7, 2007, at 5:47 PM, Alex Harui wrote:

>
> Yes, you should deal with listData in commitProperties or later.   
> That's why it is only one level of hairy.
>
> From: flexcoders@yahoogroups.com  
> [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt
> Sent: Friday, September 07, 2007 3:08 PM
> To: flexcoders@yahoogroups.com
> Subject: RE: [flexcoders] Re: Unwanted scrollbars on my List  
> itemRenderer--measure() help?
>
>
> “listData is available when … commitProperties runs” and  
> commitProperties runs after set data(), yes? So if a renderer needs  
> to use listData, it should do that work in commitProperties.   
> Right? That clears up some questions I had about ListItemRenderer.
>
> That’s 0.2 orders of magnitude less hairy.
>
> Tracy
>
> From: flexcoders@yahoogroups.com  
> [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui
> Sent: Friday, September 07, 2007 5:52 PM
> To: flexcoders@yahoogroups.com
> Subject: RE: [flexcoders] Re: Unwanted scrollbars on my List  
> itemRenderer--measure() help?
>
> The "rules" are:
>
> listData is set for you and should never be modified by the renderer.
>
> listData is available when the dataChange event fires or  
> commitProperties runs
>
> explicitWidth should be set so use that to your advantage.
>
> Is there any way you can know by the url of the image what its  
> height will be?
>
> From: flexcoders@yahoogroups.com  
> [mailto:[EMAIL PROTECTED] On Behalf Of David Ham
> Sent: Friday, September 07, 2007 2:43 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Unwanted scrollbars on my List  
> itemRenderer--measure() help?
>
> > It should only be one level of hairy, not three...
>
> LOL. Sorry, I wax hyperbolic late in the day, when the caffeine has
> jacked me up and Flex has dragged me behind its car for a ways. I'll
> dig around in measure() and see what I can do.
>
> Do I need to worry about setting listData when I subclass
> ListItemRenderer? I am getting null object reference errors around  
> it...
>
> OK
> DAH
>
>
>
>
> 



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to