incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael A. Labriola" <>
Subject RE: ArrayList itemUpdateHandler Change
Date Tue, 10 Apr 2012 15:38:38 GMT
>This did not make sense to me.  ItemUpdated is called on objects that should already exist
in a dataprovider, no?  Can I get more details on the scenario?

When you call itemUpdated, you pass it an object:

     public function itemUpdated(item:Object, property:Object = null, 
                                 oldValue:Object = null, 
                                 newValue:Object = null):void
        var event:PropertyChangeEvent =
            new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE);
        event.kind = PropertyChangeEventKind.UPDATE;
        event.source = item; = property;
        event.oldValue = oldValue;
        event.newValue = newValue;

Notice that the event is passed to the itemUpdateHandler, not dispatched. So, there is no
target in the event, which is what is being looked for in the other method. 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: itemUpdateHandler() is sometimes called this way, and sometimes called as the
result of an actual event dispatch.

However, regardless of all of this, we are still calling a method which states that -1 is
a valid return value, but casting it to an uinsigned integer. That is a problem in and of

See the issue?

View raw message