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.

This commit is contained in:
geojeff 2013-04-17 21:15:03 -05:00
parent 7f21f7b69e
commit 5715cc4b7c
4 changed files with 4 additions and 4 deletions

View File

@ -40,7 +40,7 @@ class FruitDetailView(GridLayout):
if type(selected_object) is str:
self.fruit_name = selected_object
else:
self.fruit_name = str(selected_object)
self.fruit_name = selected_object.text
self.redraw()

View File

@ -27,7 +27,7 @@ class FruitsListAdapter(ListAdapter):
return
category = \
fruit_categories[str(fruit_categories_adapter.selection[0])]
fruit_categories[fruit_categories_adapter.selection[0].text]
# We are responsible with resetting the data. In this example, we are
# using lists of instances of the classes defined below, CategoryItem

View File

@ -19,7 +19,7 @@ class FruitsDictAdapter(DictAdapter):
return
category = \
fruit_categories[str(fruit_categories_adapter.selection[0])]
fruit_categories[fruit_categories_adapter.selection[0].text]
self.sorted_keys = category['fruits']

View File

@ -48,7 +48,7 @@ class FruitsDictAdapter(DictAdapter):
return
category = \
fruit_categories[str(fruit_categories_adapter.selection[0])]
fruit_categories[fruit_categories_adapter.selection[0].text]
self.sorted_keys = category['fruits']