Signal additions now return a handler

This commit is contained in:
Chris Jones 2010-01-26 11:05:00 +00:00
parent 02a5c07ccf
commit 8aebcf62a2
1 changed files with 3 additions and 0 deletions

View File

@ -6,6 +6,7 @@
>>> widget = TestWidget() >>> widget = TestWidget()
>>> signalman = Signalman() >>> signalman = Signalman()
>>> signalman.new(widget, 'test1', handler) >>> signalman.new(widget, 'test1', handler)
1
>>> signalman.cnxids[widget].keys() >>> signalman.cnxids[widget].keys()
['test1'] ['test1']
>>> widget.signals.values() >>> widget.signals.values()
@ -16,7 +17,9 @@ False
>>> widget.signals.values() >>> widget.signals.values()
[] []
>>> signalman.new(widget, 'test2', handler) >>> signalman.new(widget, 'test2', handler)
2
>>> signalman.new(widget, 'test3', handler) >>> signalman.new(widget, 'test3', handler)
3
>>> signalman.remove_signal(widget, 'test2') >>> signalman.remove_signal(widget, 'test2')
>>> signalman.cnxids[widget].keys() >>> signalman.cnxids[widget].keys()
['test3'] ['test3']