flare.event

Event dispatcher for non-browser Events which occur on Widget state changes.

Module Contents

Classes

EventDispatcher

Base class for event notifier.

class flare.event.EventDispatcher(name)

Bases: object

Base class for event notifier.

_genTargetFuncName()

Return the name of the function called on the receiving object.

register(cb, reset=False)

Append “cb” to the list of objects to inform of the given Event.

Does nothing if cb has already subscribed. :param cb: the object to register :type cb: object

unregister(cb)

Remove “cb” from the list of objects to inform of the given Event.

Does nothing if cb is not in that list. :param cb: the object to remove :type cb: object

fire(*args, **kwargs)

Fire the event.

Informs all subscribed listeners. All parameters passed to the receiving function.