rob84

Events are buggy

Discussion created by rob84 on Feb 18, 2010
Latest reply on Dec 15, 2010 by tomfumb
I have found the following bugs in the events classes (all still present from earlier versions of ArcMap)

ESRI.ArcGIS.Carto.IFeatureLayerSelectionEvents_Event.FeatureLayerSelectionChanged
If the selection rectangle drawn by the user did not select any records then this event is raised 3 times.
The event is raised when the layer is not visible, and it's raised 3 times too.
The event is raised when the layer is toggled as "not selectable".


ESRI.ArcGIS.Carto.IActiveViewEvents_Event.SelectionChanged
When clearing selection the event is raised twice.
Adding a new data frame raises this event, which it shouldn't.
When deleting a graphic and this event is being caught then the map does not refresh.  The event is also raised twice again.
The event is raised when a feature layer is removed from the map (the layer did not have a selection either).


ESRI.ArcGIS.Carto.IActiveViewEvents_Event.ItemReordered
The toIndex arguments always returns -2147483648.
A layer being added to or removed from the map that would alter the index of the layer thus 'reorder' does not raise this event.


ESRI.ArcGIS.Carto.IActiveViewEvents_Event.ContentsCleared
Could not get this event to be raised.  Not sure what it's mean't to do either as the documentation is not that specific.

ESRI.ArcGIS.Carto.IActiveViewEvents_Event.FocusMapChanged
The event does not get raised when the map focus changes.  Though IDocumentEvents_Event.ActiveViewChanged seems to work ok.

Some events seem to be missing from ArcObjects too to cover over changes in layer properties for example:

  • Field Visibility Changes

  • Field Aliases change

  • Data source changes in ILayer_Events

  • Primary display field is changed

  • Join/ relate added/changed/removed in ILayer_Events

Outcomes