demo_treeview.py
changeset 41 37b7dfc3eae6
parent 40 5faa38c10b67
child 42 0224ce40792f
--- a/demo_treeview.py	Wed Dec 26 01:00:31 2012 +0100
+++ b/demo_treeview.py	Sat Dec 29 12:16:06 2012 +0100
@@ -10,7 +10,7 @@
 class MyApplication(Application):
     def __init__(self):
         Application.__init__(self)
-        self.top.connect('keypress', self.globalkeypress)
+        self.top.connect('keypress', self.on_top_keypress)
 
         model = TreeModel()
         model.add('/',  ['a', 'b'])
@@ -32,8 +32,8 @@
         vert = VerticalLayout()
         self.top.layout(vert)
 
-    def globalkeypress(self, eo, keyname, char):
-        if keyname == 'escape':
+    def on_top_keypress(self, ev):
+        if ev.keyname == 'escape':
             self.terminate()