Installs a Dispatcher on an AttributeCollectionBase.
- This class decorator does the following:
- create a Dispatcher and store it in
self.__dispatcher
- delegate to all methods of the dispatcher's public delegation profile
- add a
self.__dispatch method that delegates to
self.__dispatcher.dispatch
- register the
event_names on the dispatcher
Note on ctor usage: though self.__dispatcher already exists, the delegation
to it is not yet installed. You can use self.__dispatcher , but you can't
yet e.g. call self.add_handler , write self.__dispatcher.add_handler
instead.
- Parameters:
- event_names :: (::string...)
- collection of events to register on the dispatcher
|