Mercurial > urwid-satext
comparison urwid_satext/sat_widgets.py @ 116:8e9a6a9c727e
minor docstring fix
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 17 Nov 2015 12:29:14 +0100 |
parents | 2b7eafea8bdb |
children | 0cf705af755c |
comparison
equal
deleted
inserted
replaced
115:2b7eafea8bdb | 116:8e9a6a9c727e |
---|---|
1143 def setCallback(self, name, callback, data=None): | 1143 def setCallback(self, name, callback, data=None): |
1144 """Set the callback associated with a button press | 1144 """Set the callback associated with a button press |
1145 | 1145 |
1146 @param name: one of "ok", "cancel", "yest", "no" | 1146 @param name: one of "ok", "cancel", "yest", "no" |
1147 @aram callback(callable): method to call on requested action | 1147 @aram callback(callable): method to call on requested action |
1148 @param args*: argument to send to the callback (first one will be the button widget | 1148 @param data: argument to send to the callback (first one will be the button widget) |
1149 @raise KeyError if name is invalid | 1149 @raise KeyError if name is invalid |
1150 """ | 1150 """ |
1151 button = self.buttons[name] | 1151 button = self.buttons[name] |
1152 urwid.connect_signal(button, 'click', callback, data) | 1152 urwid.connect_signal(button, 'click', callback, data) |
1153 | 1153 |