demo_checkbox.py
changeset 34 e3beacd5e536
parent 30 05500124d7fb
child 41 37b7dfc3eae6
--- a/demo_checkbox.py	Fri Dec 14 10:32:43 2012 +0100
+++ b/demo_checkbox.py	Sun Dec 16 20:49:54 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_keypress)
 
         vert = VerticalLayout(homogeneous=False)
         self.top.layout(vert)
@@ -22,7 +22,7 @@
             cbox = Checkbox('checkbox ' + str(i))
             self.top.add(cbox)
         
-    def globalkeypress(self, keyname, char):
+    def on_keypress(self, keyname, char):
         if keyname == 'escape' or char == 'q':
             self.terminate()