items the DataGrid code determines are visible to the viewer each get their own instance. Thus when you scroll, instances should be re-used on items visible. If your DataGrid is displaying all 30 rows of your 19-tuple data, then each will get its own instance. They'd have to eh?. If you display say 10 rows, you should see 190 instances in your case. Nice work by the way. I saw this approach on a blog somewhere, though can't recall which one, maybe a Cynergy blog.
DK On Jan 23, 2008 12:47 PM, Ji Soo Yi <[EMAIL PROTECTED]> wrote: > Dear all: > > As shown in the attached figure, I would like to build a large datagrid, > and each cell shows a number and horizontal bar chart. I successfully > built one by creating AS class inherited from UIComponent and > implementing some interfaces ( i.e., IDropInListItemRenderer, > IListItemRenderer, and IDataRenderer). I used > flash.display.Graphics.drawRect() to draw the bar chart, and use > mx.core.UITextField to put the number. Am I doing ok? > > However, as I tested, I noticed multiple instances of item renderer were > created (it was a 19-by-30 grid, and 570 instances were created). It > differs from what I expected. Alex's blog ( > http://blogs.adobe.com/aharui/item_renderers/ > <http://blogs.adobe.com/aharui/item_renderers/>) says, "A single > instance of an item renderer can end up displaying the data of several > different items in your data provider." So, I expected that a single > instance of my customer item renderer was created once and used multiple > times. If it works that way, I think that I can improve my performance. > Did I do something wrong? > > Regards, > Ji Soo Yi > Georgia Institute of Technology > http://www.isye.gatech.edu/~jyi <http://www.isye.gatech.edu/%7Ejyi> < > http://www.isye.gatech.edu/%7Ejyi> > > > > ------------------------------------------------------------- > To unsubscribe from this list, simply email the list with unsubscribe in > the subject line > > For more info, see http://www.affug.com > Archive @ http://www.mail-archive.com/discussion%40affug.com/ > List hosted by http://www.fusionlink.com > ------------------------------------------------------------- > -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it? ------------------------------------------------------------- To unsubscribe from this list, simply email the list with unsubscribe in the subject line For more info, see http://www.affug.com Archive @ http://www.mail-archive.com/discussion%40affug.com/ List hosted by http://www.fusionlink.com -------------------------------------------------------------
