##// END OF EJS Templates
Fixed _send so it can open a comm if needed....
Jonathan Frederic -
Show More
@@ -278,7 +278,8 b' class Widget(LoggingConfigurable):'
278 278 view_name: unicode (optional)
279 279 View to display in the frontend. Overrides view_name."""
280 280
281 # Show view.
281 # Show view. By sending a display message, the comm is opened and the
282 # initial state is sent.
282 283 self._send({"method": "display", "view_name": view_name})
283 284 self._displayed = True
284 285 self._handle_displayed(**kwargs)
@@ -307,11 +308,7 b' class Widget(LoggingConfigurable):'
307 308
308 309 def _send(self, msg):
309 310 """Sends a message to the model in the front-end"""
310 if self._comm is not None:
311 self._comm.send(msg)
312 return True
313 else:
314 return False
311 self.comm.send(msg)
315 312
316 313
317 314 class DOMWidget(Widget):
General Comments 0
You need to be logged in to leave comments. Login now