As far as I know, you're not supposed to be setting the 'data' of an item renderer yourself. It is set by the component (e.g., spark.components.List) that creates the item renderer, and it gets set to the element in the dataProvider that the renderer is created to render. So whatever you're setting it to is probably getting clobbered by what the component wants to set it to.
Adobe Flex SDK Team
Thanks Gordon. I'm probably not phrasing it well. Nor am I approaching it well, so I'll ask for advice on the actual issue. I have a calendar. I have categories of appointments associated with these calendar appointments and those combination of categories are determined by checkboxes I check in another component using an itemRenderer inside that component. So if I have one checkbox marked when I dispatch a createNewAppointment, one type of appointment will be created. And if two are checked, another type of appointment will be created. The appointment shows up graphically on the calendar using itemRenderers for the calendar. That all works fine.
Now I'd like to go the other way. When I click on a calendar appointment itemRenderer, I'd like update the checkboxes in the other list to reflect the appointment that now has the focus. It's pretty straight forward getting and setting the properties of the event like description, time etc because they are placed into textboxes and have named targets, but I'm having trouble finding the best approach to update the itemRenderers in the first list to reflect the type of appointment that now has the focus. So I'm open to suggestions to how I programmatically reflect the attributes of the calendar appointment I click by getting the checkboxes to reflect the number that was checked when I created the event.
If the event you dispatch from the renderer is bubbling, you can listen to it any place on the display list that is above the renderer on the display list. If you assume that there is also some place above the renderer that knows about the check boxes (or some variable the check boxes are bound to), then in the event handler for that event you can set the check box/variable values.
It's difficult to get more specific than that without some code from you .
Thanks, Amy. I'm working away understanding scope inside itemRenderers with selectedItems (a Vector) changing and updating the dataProvider for the selectedItems. In other words, I appreciate your help and if I'm still stuck tomorrow I'll try to share a simple code example.