Commit Graph

4 Commits

Author SHA1 Message Date
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 23ac1d8601 Improvement of the composite list view example. 2012-08-01 12:53:43 -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