##// END OF EJS Templates
remove 3rd callback type from on_displayed
Jonathan Frederic -
Show More
@@ -149,12 +149,7 b' class Widget(LoggingConfigurable):'
149 self.send_state(key=name)
149 self.send_state(key=name)
150
150
151 def _handle_displayed(self, **kwargs):
151 def _handle_displayed(self, **kwargs):
152 """Called when a view has been displayed for this widget instance
152 """Called when a view has been displayed for this widget instance"""
153
154 Parameters
155 ----------
156 [view_name]: unicode (optional kwarg)
157 Name of the view that was displayed."""
158 for handler in self._display_callbacks:
153 for handler in self._display_callbacks:
159 if callable(handler):
154 if callable(handler):
160 argspec = inspect.getargspec(handler)
155 argspec = inspect.getargspec(handler)
@@ -169,8 +164,6 b' class Widget(LoggingConfigurable):'
169 handler()
164 handler()
170 elif nargs == 1:
165 elif nargs == 1:
171 handler(self)
166 handler(self)
172 elif nargs == 2:
173 handler(self, kwargs.get('view_name', None))
174 else:
167 else:
175 handler(self, **kwargs)
168 handler(self, **kwargs)
176
169
@@ -256,7 +249,6 b' class Widget(LoggingConfigurable):'
256 Can have a signature of:
249 Can have a signature of:
257 - callback()
250 - callback()
258 - callback(sender)
251 - callback(sender)
259 - callback(sender, view_name)
260 - callback(sender, **kwargs)
252 - callback(sender, **kwargs)
261 kwargs from display call passed through without modification.
253 kwargs from display call passed through without modification.
262 remove: bool
254 remove: bool
General Comments 0
You need to be logged in to leave comments. Login now