Documentation error

605
3
09-01-2011 01:54 AM
DmitrySharov
New Contributor
Documentation:
IActiveViewEvents.ItemAdded Event

[C#]
public event ItemAddedEventHandler ItemAdded

Reality:
// Summary:
//     Provides access to events that occur when the state of the active view changes.
[Guid("E79C5940-52DD-11D0-98BE-00805F7CED21")]
[InterfaceType(1)]
[TypeLibType(256)]
public interface IActiveViewEvents
{
...
//
// Summary:
//     Fired when an item is added to the view.
void ItemAdded(object Item);
...
}


And how I'm supposed to use IActiveViewEvents?
0 Kudos
3 Replies
NeilClemmons
Regular Contributor III
I'm not sure where you're seeing an error.  You've posted the delegate declaration as well as the interface declaration.  Those are two different things.  If you need information on how to wire ArcObjects events in .NET then refer to this help page:

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_wire_ArcObjects_...
0 Kudos
DmitrySharov
New Contributor
The problem is, that by documentation ItemAdded is event, but actually in object browser ItemAdded is method.
0 Kudos
NeilClemmons
Regular Contributor III
You're confusing two different things.  The first thing you posted is the declaration of the delegate to be used when wiring the event.  The second thing is the interface definition.  IActiveViewEvents is an "outgoing" interface (also called an event interface).  In COM programming, events are defined as methods on an event interface.  Classes that need to expose these events do so by implementing the event interface.  Here's an article that might help you:

http://www.codeproject.com/KB/COM/TEventHandler.aspx
0 Kudos