ICollectionEvents Interface

This is a callback interface that is used for reporting events from the following collection objects to the listeners:

This interface is implemented on the client side. See the detailed implementation advice for your development tool in Working with Connectable Objects. Below you can find a short summary.

In C++ you need to implement the ICollectionEvents interface, obtain a connection point, and "advise" object implementing the interface to the necessary connectable object. As the interface is derived from the IUnknown interface, the client object should also implement the IUnknown methods.

Visual Basic users that want to receive notifications from one of these objects should declare the event source object of the CollectionEventsSource type WithEvents, initialize it with the required collection object and implement the Sub's similar to the following:

Private Sub eventsSource_OnCollectionChanged(ByVal Reloaded As Boolean, _
                                             ByVal AddedItems As IntsCollection, _
                                             ByVal DeletedItems As IntsCollection, _
                                             ByVal ModifiedItems As IntsCollection)
...
End Sub
    

An object receiving notifications through this interface methods may do the following inside the methods implementation:

  • Process any Windows messages, which is useful in applications having User Interface, to avoid an effect that the application "is not responding" during long recognition operations.
  • Report information about adding, deleting and modifying of collection elements to the user.

Methods

Name Description
OnCollectionChanged Delivers to the client information about adding, deleting and modifying of collection elements.

See also

Working with Connectable Objects

Working with Collections

15.08.2023 13:19:30

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.