| Home | Trees | Indices | Help |
|
|---|
|
|
GNUmed client internal signal handling.
# this code has been written by Patrick O'Brien <pobrien@orbtech.com> # downloaded from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/87056
| Classes | |
| DispatcherError | |
|
BoundMethodWeakref BoundMethodWeakref class. |
|
| Functions | |||
|
|||
|
|||
|
|||
|
|||
| Variables | |
wx_core_PyDeadObjectError = None
|
|
known_signals =
|
|
connections =
|
|
senders =
|
|
Any = _Any()
|
|
__package__ =
|
|
Imports: exceptions, types, sys, weakref, traceback, logging
| Function Details |
Connect receiver to sender for signal.
If sender is Any, receiver will receive signal from any sender.
If signal is Any, receiver will receive any signal from sender.
If sender is None, receiver will receive signal from anonymous.
If signal is Any and sender is None, receiver will receive any
signal from anonymous.
If signal is Any and sender is Any, receiver will receive any
signal from any sender.
If weak is true, weak references will be used.
ADDITIONAL gnumed specific documentation:
this dispatcher is not designed with a gui single threaded event
loop in mind.
when connecting to a receiver that may eventually make calls to gui objects such as wxWindows objects, it is highly recommended that any
such calls be wrapped in wxCallAfter() e.g.
def receiveSignal(self, **args):
self._callsThatDoNotTriggerGuiUpdates()
self.data = processArgs(args)
wxCallAfter( self._callsThatTriggerGuiUpdates() )
since it is likely data change occurs before the signalling,
it would probably look more simply like:
def receiveSignal(self, **args):
wxCallAfter(self._updateUI() )
def _updateUI(self):
# your code that reads data
Especially if the widget can get a reference to updated data through
a global reference, such as via gmCurrentPatient.
|
Disconnect receiver from sender for signal. Disconnecting is not required. The use of disconnect is the same as for connect, only in reverse. Think of it as undoing a previous connection. |
Send signal from sender to all connected receivers. Return a list of tuple pairs [(receiver, response), ... ]. If sender is None, signal is sent anonymously. |
| Variables Details |
known_signals
|
connections
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Sat Oct 5 03:56:04 2013 | http://epydoc.sourceforge.net |