Package wx :: Package py :: Module dispatcher

[frames | no frames]

## Module wx.py.dispatcher

Provides global signal dispatching services.

Classes
`BoundMethodWeakref` | BoundMethodWeakref class.
`Parameter` | Used to represent default parameter values.

Exceptions
`DispatcherError` |

Function Summary
| ``connect`(receiver, signal, sender, weak)` Connect receiver to sender for signal.
| ``disconnect`(receiver, signal, sender, weak)` Disconnect receiver from sender for signal.
| ``safeRef`(object)` Return a safe weak reference to a callable object.
| ``send`(signal, sender, **kwds)` Send signal from sender to all connected receivers.

Variable Summary
`str` | `__author__` = `"Patrick K. O'Brien <pobrien@orbtech.com>"`
`str` | `__cvsid__` = `'$Id: dispatcher.py,v 1.6 2006/06/11 00:12:5...`
`str` | `__revision__` = `'1.6'`
`Anonymous` | `Anonymous` = `Anonymous`
`Any` | `Any` = `Any`
`dict` | `connections` = `{}`
`dict` | `senders` = `{}`

Function Details

### connect(receiver, signal=Any, sender=Any, weak=True)

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.

### disconnect(receiver, signal=Any, sender=Any, weak=True)

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.

### safeRef(object)

Return a safe weak reference to a callable object.

### send(signal, sender=Anonymous, **kwds)

Send signal from sender to all connected receivers.

Return a list of tuple pairs [(receiver, response), ... ]. If sender is not specified, signal is sent anonymously.

Variable Details

### __author__

  Type:
    `str`
  Value:

        "Patrick K. O'Brien <pobrien@orbtech.com>"

### __cvsid__

  Type:
    `str`
  Value:

        '$Id: dispatcher.py,v 1.6 2006/06/11 00:12:53 RD Exp $'

### __revision__

  Type:
    `str`
  Value:

        '1.6'

### Anonymous

  Type:
    `Anonymous`
  Value:

        Anonymous

### Any

  Type:
    `Any`
  Value:

        Any

### connections

  Type:
    `dict`
  Value:

        {}

### senders

  Type:
    `dict`
  Value:

        {}

Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:10:40 2007 | http://epydoc.sf.net