From e71dcabc1b6e189731d3e7d1adc8d014c521d199 Mon Sep 17 00:00:00 2001 From: Julien Miotte Date: Tue, 20 Nov 2012 20:25:08 +0100 Subject: [PATCH] Fixing bind() exemple (undefined refs). --- kivy/_event.pyx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kivy/_event.pyx b/kivy/_event.pyx index ffaebcb90..71b94b042 100644 --- a/kivy/_event.pyx +++ b/kivy/_event.pyx @@ -163,9 +163,10 @@ cdef class EventDispatcher(object): class MyClass(BoxLayout): def __init__(self): - super(MyClass, self).__init__(**kwargs) - btn = Button(text='click on') - btn.bind(on_press=self.my_callback) #bind event + super(MyClass, self).__init__() + btn = Button(text='click me') + # Bind event to callback + btn.bind(on_press=self.my_callback) self.add_widget(btn) def my_callback(self,obj,value):