>Frankly, all of the propertyChange stuff and collectionChange stuff is a mess >and inconsistent. I want to fix it all, but I am trying to make the narrowest >number of changes until we have tests. The other method:
Adding to this for a moment. One of the issues here is that when a child object is an event dispatcher and dispatches the event, the ArrayList passes along that event. That is use case #1 for itemUpdatedHandler... in this use case the target can be used for determining which item it was in the Array. Use case #2 is that this is called when a property is directly modified through things like itemUpdated() or setItemAt(), etc. In those cases, there is actually a source propery set instead. However, in both cases itemUpdateHandler attempts to use the target to find the index in the array and hence a property change event. Initially I thought we could fix this by just having two handlers, and we can... and should. The amusing part is that this particular property of the property change event is rarely examined in the framework, it is the mere existence of the event that causes a refresh. However, this error does actually have some performance impact issue (as well as a few times where you can get out of bounds errors) in the AdvancedDataGrid. So, I would like to truly 100% fix it the right way. Things would be better, more efficient and we could actually fix some other bugs. I just cant tell all of the side effects so I want to keep it contained until we have tests. Make more sense? Mike