Chapter 15.2.4. Custom Events
If signals and slots are so useful a model for DOM events, why can’t you use them for other things in your app? Short answer: You can. There’s one more function in the Signal package that has not been discussed: signal(src, signal, …). That function fires off a signal and passes all the additional parameters to the connected slots.
Here is something you can try in the interactive interpreter:
The signals and slots model provides an easy way to produce loosely coupled, event-driven scripts. This model works quite nicely for dealing with DOM events, and larger Ajax-style applications will ...
Get Rapid Web Applications with TurboGears: Using Python to Create Ajax-Powered Sites now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.