1.

What Events Are Used By The Collections?

Answer»

 Collections dispatch CollectionEvent, PropertyChangeEvent and FlexEvent OBJECTS.

  • Collections dispatch a CollectionEvent when there is a change in collection. The property kind for a CollectionEvent OBJECT can be used to find which kind of change occurred. This property is compared against CollectionEventKind constants to find what the change was for example, UPDATE etc.
  • The CollectionEvent object includes an items property that is an ARRAY of objects. For ADD and REMOVE kind events this contains added or removed items, but for UPDATE it contains an array of PropertyChangeEvent objects.
  • PropertyChangeEvent class has kind property to indicate the WAY in which property changed. This can be determined by comparing kind property with PropertyChangeEventKind constants, for example UPDATE. This EVENT object also has properties to indicate the values before and after the change.
  • View cursor objects dispatch a FlexEvent with type property mx.events.FlexEvent.CURSOR_UPDATE when the cursor position changes.

 Collections dispatch CollectionEvent, PropertyChangeEvent and FlexEvent objects.



Discussion

No Comment Found