qua-non
959a99c3fd
py3 fixes
2013-06-12 06:10:30 +05:30
Mathieu Virbel
f2ae15c6ec
py3: fix few more print
2013-05-31 11:12:21 +02:00
Mathieu Virbel
bea9afa389
sync (no tested)
2013-05-30 18:01:39 +02:00
geojeff
0f1ea4a82e
Commented out several print lines in examples.
2013-04-17 21:18:10 -05:00
geojeff
5715cc4b7c
Fixed the examples using fruit data, for a recent change to the way __repr__ in ListItemButton and friends works (should just use item.text anyway.
2013-04-17 21:15:03 -05:00
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
Mathieu Virbel
bae94bc3db
first 2to3 pass + manual fix for metaclass, UserDict and OrderedDict
2013-03-18 17:39:56 -06:00
geojeff
d71a83cc06
Added a list example that illustrates adding and changing data on a timer.
2013-02-12 16:29:16 -06:00
geojeff
254497d07b
Changed arguments checking in ListView to account for possible use of kv in the definition of a ListView. Added several new examples and tests, and new entries in ListView docs. Also deleted ObserverView, which is not used anywhere. The pre-commit hook was not allowing this commit, because a file was deleted and the style check failed to find it. So, modified the pre-commit hook to use a different method to find staged files.
2012-12-16 10:52:41 -06: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
d5d15de84b
Added docs in listview, and made a few related fixes in tests and examples.
2012-10-23 15:34:59 -05:00
geojeff
0a64656bdb
Removed notes from examples readme.
2012-10-23 14:04:45 -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
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
93c735767b
Added first DictAdapter test, for checking basics and using a cls.
2012-10-19 10:37:37 -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
geojeff
85373d147e
Removed check for args_converter in ListAdapter, because in Adapter, if none is provided, a default is set -- there will always be an args_converter.
2012-10-18 13:57:34 -05:00
geojeff
da11bf1253
Added tests for calling SimpleListAdapter methods.
2012-10-18 11:12:38 -05:00
geojeff
64da0c1f43
Added tests for instantiating Adapter and ListAdapter. In the process, decided to take all method code out of Adapter, and put raise NotImplementedError in each.
2012-10-17 16:36:08 -05:00
geojeff
c22e71f5cc
Moved todo lists and notes out of core code and into the README for list examples.
2012-10-17 11:53:48 -05:00
Jeff Pittman
146bcf8773
Changed list item buttons in composite example to be simple, with no use of merge_text. Added reciprocal methods in ListItemButton and ListItemLabel for handling selection of the siblings within a composite when a child is selected.
2012-09-21 04:44:30 -05:00
Jeff Pittman
22bf61f6f2
Evened out docs for examples.
2012-08-18 04:58:43 -05:00
Jeff Pittman
ae8520343d
Docs improvements and the addition of a basic README file for lists.
2012-08-17 14:45:42 -05:00
Jeff Pittman
e56cf56279
Added a base class called CollectionAdapter, with subclasses ListAdapter and DictAdapter. Added the start of trim, cut, and scroll_to methods in these adapters. Tried various combinations of examples and tests for working with sorted_keys and data in DictAdapter, settling down on bindings firing selection updates and refreshes that are stabilizing. Added a list_ops.py example showing use of the new trim, cut, and scroll_to methods, and also ways to use AliasAdapter and binding to a property setter. Removed ObjectAdapter and ObserverView, in part because of working out the approaches shown in list_ops.py, and also because it is better to take a fresh try at these classes if desired in the future.
2012-08-17 12:20:08 -05:00
Jeff Pittman
08b2aac79e
Cleaned up use of the term object, where the reference should be instead to class instance. Also changed object in variable names to item.
2012-08-14 20:27:50 -05:00
Jeff Pittman
51e8db0416
Renamed and simplified two examples.
2012-08-14 02:01:39 -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
046949a240
Deleted AccumulatingListAdapter as it can be done with straight ListAdapter. Plus, it was not restricted to accumulating only, anyway. In the revised example, now called list_cascade_setter.py, is first use of the setter() method for the to-side of a binding, which had been overlooked.
2012-08-06 10:36:57 -05:00
Jeff Pittman
ae42deb52b
Removed list_disclosure.py example. Idea for an exandable list item functionality is still mentioned in comments. It could be developed as a new listview type, instead of putting into the current listview.
2012-08-06 05:24:19 -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
d8a6458836
Removed filter choice from selection_mode, and made a section in ListView docs for ideas on possibilities for action on_selection_change.
2012-08-04 08:42:19 -05:00
Jeff Pittman
e51da87134
Added allownone=True for obj in ObjectAdapter, and for fruit_name in the list cascade examples, and modified the detail view variants in the list examples to clear widgets and redraw if the the selected fruit is None.
2012-08-04 05:28:53 -05:00
Jeff Pittman
7bc0e0ce90
Added ObserverView docs.
2012-08-04 04:21:57 -05:00
Jeff Pittman
ba8b009bb2
Added docs for ObjectAdapter. Changed ObjectAdapter to have the obj property or a obj_bind_from property. Owner, for use when a property is used as the from side of the object source binding, is now called cls, for consistency with ListAdapter and other usage.
2012-08-04 03:34:02 -05:00
Jeff Pittman
0d29acae75
Added two new classes, ObjectAdapter and ObserverView, which work together in a fashion similar to the way ListAdapter and ListView work. ObjectAdapter can be used to hold the selection of a ListAdapter. ObserverView is a view associated with this relationship, as showin the the list_cascade_oo.py example. The detail view on the right is an ObserverView, showing the view associated with the ObjectAdapter instance observing the fruit selection.
2012-08-03 17:50:22 -05:00
Jeff Pittman
8e8b732667
Made a pass through listview docs, adjusting for recent changes.
2012-08-02 22:34:18 -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
e39fe34189
Renamed multiple_cascade example to accumulating, for the adapter used.
2012-08-02 13:33:42 -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
Jeff Pittman
189dea9b19
Added thumbnail images for fruits, all from wikipedia.org.
2012-08-02 04:29:41 -05:00
Jeff Pittman
dafb48c8e8
Simplified fruit names in sample data.
2012-08-02 04:28:44 -05:00
Jeff Pittman
23ac1d8601
Improvement of the composite list view example.
2012-08-01 12:53:43 -05:00
Jeff Pittman
cd7febcbf8
Improved the kv example docs comment.
2012-08-01 11:34:26 -05:00