Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions doc/api/next_api_changes/behavior/18226-ES.rst

This file was deleted.

10 changes: 5 additions & 5 deletions lib/matplotlib/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def on_clicked(self, func):

Returns a connection id, which can be used to disconnect the callback.
"""
return self._observers.connect('clicked', func)
return self._observers.connect('clicked', lambda event: func(event))

def disconnect(self, cid):
"""Remove the callback function with connection id *cid*."""
Expand Down Expand Up @@ -483,7 +483,7 @@ def on_changed(self, func):
int
Connection id (which can be used to disconnect *func*)
"""
return self._observers.connect('changed', func)
return self._observers.connect('changed', lambda val: func(val))

def disconnect(self, cid):
"""
Expand Down Expand Up @@ -646,7 +646,7 @@ def on_clicked(self, func):

Returns a connection id, which can be used to disconnect the callback.
"""
return self._observers.connect('clicked', func)
return self._observers.connect('clicked', lambda text: func(text))

def disconnect(self, cid):
"""Remove the observer with connection id *cid*."""
Expand Down Expand Up @@ -897,7 +897,7 @@ def on_text_change(self, func):

A connection id is returned which can be used to disconnect.
"""
return self._observers.connect('change', func)
return self._observers.connect('change', lambda text: func(text))

def on_submit(self, func):
"""
Expand All @@ -906,7 +906,7 @@ def on_submit(self, func):

A connection id is returned which can be used to disconnect.
"""
return self._observers.connect('submit', func)
return self._observers.connect('submit', lambda text: func(text))

def disconnect(self, cid):
"""Remove the observer with connection id *cid*."""
Expand Down