Package ocempgui :: Package events :: Module INotifyable :: Class INotifyable
[show private | hide private]
[frames | no frames]

Type INotifyable

object --+
         |
        INotifyable

Known Subclasses:
BaseObject

INotifyable () -> INotifyable

A notifier interface class for event-capable objects.

The INotifyable class is an interface, which should be used by
objects, that make use of events using the EventManager class. It
declares a single method, notify(), which consumes the events the
object listens to.

A short example for consuming events:

class EventObject (INotifyable):
    def __init__ (self):
        ....
    def notify (self, event):
        if event.signal == 'EventObjectSignal':
            self.do_certain_action ()
        ...

Method Summary
  notify(self, event)
I.notify (...) -> None
    Inherited from object
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Method Details

notify(self, event)

I.notify (...) -> None

Notifies the object about an event.

This method has to be implemented by inherited classes. Its signature matches the basic requirements of the EventManager class.

Generated by Epydoc 2.1 on Thu Jan 10 10:18:43 2008 http://epydoc.sf.net