@@ -222,7 +222,7 @@ def on_clicked(self, func):
222
222
223
223
Returns a connection id, which can be used to disconnect the callback.
224
224
"""
225
- return self ._observers .connect ('clicked' , func )
225
+ return self ._observers .connect ('clicked' , lambda event : func ( event ) )
226
226
227
227
def disconnect (self , cid ):
228
228
"""Remove the callback function with connection id *cid*."""
@@ -483,7 +483,7 @@ def on_changed(self, func):
483
483
int
484
484
Connection id (which can be used to disconnect *func*)
485
485
"""
486
- return self ._observers .connect ('changed' , func )
486
+ return self ._observers .connect ('changed' , lambda val : func ( val ) )
487
487
488
488
def disconnect (self , cid ):
489
489
"""
@@ -646,7 +646,7 @@ def on_clicked(self, func):
646
646
647
647
Returns a connection id, which can be used to disconnect the callback.
648
648
"""
649
- return self ._observers .connect ('clicked' , func )
649
+ return self ._observers .connect ('clicked' , lambda text : func ( text ) )
650
650
651
651
def disconnect (self , cid ):
652
652
"""Remove the observer with connection id *cid*."""
@@ -897,7 +897,7 @@ def on_text_change(self, func):
897
897
898
898
A connection id is returned which can be used to disconnect.
899
899
"""
900
- return self ._observers .connect ('change' , func )
900
+ return self ._observers .connect ('change' , lambda text : func ( text ) )
901
901
902
902
def on_submit (self , func ):
903
903
"""
@@ -906,7 +906,7 @@ def on_submit(self, func):
906
906
907
907
A connection id is returned which can be used to disconnect.
908
908
"""
909
- return self ._observers .connect ('submit' , func )
909
+ return self ._observers .connect ('submit' , lambda text : func ( text ) )
910
910
911
911
def disconnect (self , cid ):
912
912
"""Remove the observer with connection id *cid*."""
0 commit comments