Commit Graph

9 Commits

Author SHA1 Message Date
Mathieu Virbel e13d1e0ecf listview: remove all size_hint of 1., 1. (that's the widget default), and fix one typo in an doc example 2013-04-11 17:49:04 +02:00
geojeff 60bc7ddf23 Changed args_converter to take row_index as first argument. Fixed the list_two_up.py example, which needed explicit set to sorted_keys. 2012-12-09 08:28:09 -06:00
geojeff 91218bcfe1 Removed lingering call to deleted touch_selection() in master detail example. Removed unused blocks that would have selected children in composite items too aggressively, if conditional had worked. 2012-10-31 18:27:54 -05:00
geojeff 3f76ea8d3a Added tests toward full coverage, revealing bugs in code that had never been reached. Simplified several parts of the API. Merged CollectionAdapter into ListAdapter, so now it goes: Adpater -> SimpleListAdapter, Adapter -> ListAdapter -> DictAdapter, with selection in ListAdapter, and DictAdapter. 2012-10-23 13:20:27 -05:00
Jeff Pittman 22bf61f6f2 Evened out docs for examples. 2012-08-18 04:58:43 -05:00
Jeff Pittman 0a4e96fda9 Changed ListAdapter to work with lists, removing complexity for having data as strings and a separate datastore. Removed DataStore and concept, and replaced with a new adapter, DictAdapter, that works straight with dicts. Updated examples and tests for changes. 2012-08-13 13:42:40 -05:00
Jeff Pittman c7b1851f73 Selection had no memory of previously selected items, because the data used in
the examples were just strings primarily. To further development with a more
realistic environment, a DataStore class was created, with simple set and get
property methods, operating on a key into a dict of records. The simple scheme
for the records is that they must all contain an is_selected boolean for
storing the state of selection. The fruit dataset was modified accordingly,
into two datastores: categories and fruits. A new simple dataset was also
created for integer data used in several examples.

For view instances to be associated with data records in a datastore, an index
property was added to SelectableItem. This index into the data list is used in
selection operations to keep selection of data items in sync with item view
instances.

When creating item view instances in ListView there is now a lookup call to
the datastore to check for selection of the associated data item record. The
data item record tested so far carries an is_selected boolean, but the code
was written to allow for an is_selected() function.
2012-08-05 12:41:06 -05:00
Jeff Pittman 8ea1783045 Split DetailView and the fruit data out into their own .py files and added/cleaned up imports. 2012-08-01 07:29:11 -05:00
Jeff Pittman 91f66e2f1a Moved list examples to a lists directory, because there are quite a few, and because some code is shared between them. 2012-08-01 07:09:46 -05:00