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
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
geojeff
04ab3cccca
Refactor for improved selection operations. SelectionSupport is no more as a separate mixin, and a new base adapter, CollectionAdapter, takes this code in, as well as the view caching code from AbstractView. Now CollectionAdapter is the hub for selection and view-handling operations. Made the default for selection to be restricted to views, with a new flag propagate_selection_to_data for this functionality. Started adding tests for adapters in isolation. Simplified initial selection and refreshing operations between adapter and listview.
2012-10-22 09:30:43 -05:00
geojeff
e66d48dbdb
Moved SelectableView out of adapters/mixins and into uix, and adjusted examples and tests. Added base Adapter tests, and a test to check views returned from adapters.
2012-10-19 09:43:54 -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
107814ed3d
Restored list_cascade_setter.py. Fixed comments about custom list adapter vs. using a setter-type binding.
2012-08-06 15:58:49 -05:00
Jeff Pittman
f791156f26
Started moving to use of setter() in creating bindings between list adapters, with an example of a custom list adapter left in list_cascade.py.
2012-08-06 13:35:27 -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
ea7ce02a89
Removed the experiment with ButtonBehavior. Worked over bindings and events widely. Realized the place to put the call to check_for_empty_selection(), as things are now, is at the bottom of listview.hard_populate(). Cleaned up all of the examples for the changes.
2012-08-02 20:53:41 -05:00
Jeff Pittman
42e20b1880
Added ButtonBehavior for use with SelectableItem. Removed use of selection_target mechanism.
2012-08-02 16:00:05 -05:00
Jeff Pittman
2cc422d53b
Found a much better solution for the relationship between ListAdapter and SelectableItem. Now ListAdapter sets up the binding between SelectableItem on_release event and ListAdapter.handle_selection(). handle_selection(), additionally, now has to check obj.selection_target before calling the new internal _handle_selection(obj) on the selection_target.
2012-08-02 12:46:14 -05:00
Jeff Pittman
e242f9b406
Made temporary changes to get the kv template to work with list_cascade_images.py. Will have to review the way list_adapter is set into SelectableItem.
2012-08-02 11:45:18 -05:00
Jeff Pittman
caec459146
Added Factory register call, and trying to use CompositeListItem in the template for the new thumbnailed cascading lists example.
2012-08-02 10:55:21 -05:00
Jeff Pittman
753696f78b
Added an example to work with new fruit images.
2012-08-02 09:28:57 -05:00