Always give the Listbox items.
authorMatthijs Kooijman <matthijs@stdin.nl>
Tue, 3 Nov 2009 16:41:56 +0000 (17:41 +0100)
committerMatthijs Kooijman <matthijs@stdin.nl>
Tue, 3 Nov 2009 16:41:56 +0000 (17:41 +0100)
PyS60 doesn't support a Listbox without items.

src/gui/gui.py

index 5c4d0b8ee7e221ad26b087909f27ff64091dd20e..50c6d3138205afa063b40c753a808496bc1b5160 100644 (file)
@@ -207,8 +207,8 @@ class ListView(View):
     def __init__(self):
         super(ListView, self).__init__()
         self.current_index = None
-        self.items_cache = []
-        self.set_view(appuifw.Listbox([], self.entry_selected))
+        self.items_cache = self.items()
+        self.set_view(appuifw.Listbox(self.items_cache, self.entry_selected))
         self.view.bind(EKeyUpArrow,lambda: self.arrow_key_pressed(-1))
         self.view.bind(EKeyDownArrow,lambda: self.arrow_key_pressed(1))