Source¶
A base class for data source implementations.
Usage¶
Data sources are abstractions that allow you to define the data being managed by your application independent of the GUI representation of that data. For details on the use of data sources, see the topic guide.
Source isn't useful on its own; it is a base class for data source implementations. It is used by ListSource, TreeSource and ValueSource, but it can also be used by custom data source implementations. It provides an implementation of the notification API that data sources must provide.
Reference¶
toga.sources.Listener ¶
toga.sources.Source ¶
Source()
A base class for data sources, providing an implementation of data notifications.
listeners
property
¶
listeners
add_listener ¶
add_listener(listener)
Add a new listener to this data source.
If the listener is already registered on this data source, the request to add is ignored.
| PARAMETER | DESCRIPTION |
|---|---|
listener
|
The listener to add
TYPE:
|
notify ¶
notify(notification, **kwargs)