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

Type EventCallback

object --+
         |
        EventCallback


EventCallback (signal, callback, *data) -> EventCallback

Creates a new EventCallback to use as a signal handler for objects.

The EventCallback can be used as container object for event mechanisms, which need signal to method bindings. The connected callback can be invoked using the EventCallback.run() method.

Attributes: signal - Identifier of the event to wait for. callback - Function/method to invoke upon receiving the event. data - Data to pass to the function/method.
Method Summary
  __init__(self, signal, callback, *data)
  run(self, *data)
E.run (...)
    Inherited from object
  __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)

Class Variable Summary
list __slots__ = ['signal', 'data', 'callback']
member_descriptor callback = <member 'callback' of 'EventCallback' objects...
member_descriptor data = <member 'data' of 'EventCallback' objects>
member_descriptor signal = <member 'signal' of 'EventCallback' objects>

Method Details

run(self, *data)

E.run (...)

Invokes the callback of the EventCallback.

If additional data is supplied via the 'data' argument, the already attached callback data in the EventCallback.data attribute will be concatenated to it and the result will be passed to the callback.

Class Variable Details

__slots__

Type:
list
Value:
['signal', 'data', 'callback']                                         

callback

Type:
member_descriptor
Value:
<member 'callback' of 'EventCallback' objects>                         

data

Type:
member_descriptor
Value:
<member 'data' of 'EventCallback' objects>                             

signal

Type:
member_descriptor
Value:
<member 'signal' of 'EventCallback' objects>                           

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