If you are using dispatchEvent(new Event("change",true)) the second
argument tells the event to "bubble" and you should be able to listen
for it anywhere in the displayList, including the List, and Application.

 

However, it sounds suspiciously like you are not having your checkbox
renderer update the dataProvider.  This is required. You cannot "walk
any array of elements inside the list"  You must look at the
dataProvider only.  The visual elements, including the checkboxes cease
to exist when they are scrolled.

 

Tracy  

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Matt Maher
Sent: Friday, December 22, 2006 4:07 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ItemRenderers and Events

 

I'm having troubles with capturing events from an item in a List which
uses an itemRenderer. 

Basically I'm overriding a multi-select List to have a checkbox in it
with a simple itemRenderer. The item renderer is handling the clicks
and managing the checkbox just fine. It also dispatches an event when
clicked.

But when it comes time to listen to that event I don't know who to ask
to listen to it. The component which included the List doesn't seem to
care, and the List item itself surely doesn't seem to be attachable...

Another workaround was to capture all clicks on the LIST itself, then
walk the itemRendered elements, asking each one if it was checked or
not. That one baffles me. I cannot seem to walk any array of data
elements inside the list. I can see the dataProvider array in the
debugger, but I need the "itemRenderer" list so I have reference to
the checkbox element.

This seemed so simple at first. Now I'm just flailing around.

 

Reply via email to