Jump to: navigation, search

Signals and Callbacks

84 bytes added, 00:14, 2 July 2017
== Callback ==
For the db and most of the GUI, the [ ] module with its Callback class provides much of the functionality. The Callback class is usually a base class for modules that emit and allow connection to callbacks, so its methods become part of the main class. An example is the class DbBsddbRead, or the History class. When emitting or connecting to a callback it is important to use the correct object in calling the method. If your code needs to see a 'databased-changed' and 'person-update' signals, for instance, you might use:
self.dbstate.connect('database-changed', self.db_changed)
self.db.connect('person-update', self.update)

Navigation menu