<div dir="ltr">Nicholas,<div><br>Thanks for all of your help on this.  We were able to see it through and put you in the acknowledgements:<br><br><a href="https://www.youtube.com/watch?v=RhMHgQbP__A">https://www.youtube.com/watch?v=RhMHgQbP__A</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 30, 2014 at 8:35 PM, Nicholas Bollweg <span dir="ltr"><<a href="mailto:nick.bollweg@gmail.com" target="_blank">nick.bollweg@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">if there's nothing else going on there, that is correct!<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 30, 2014 at 1:38 PM, Adam Hughes <span dir="ltr"><<a href="mailto:hughesadam87@gmail.com" target="_blank">hughesadam87@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">So we can also drop the def displayed() / on_displayed portions of the GUI, right?</div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Thu, Oct 30, 2014 at 1:05 PM, Nicholas Bollweg <span dir="ltr"><<a href="mailto:nick.bollweg@gmail.com" target="_blank">nick.bollweg@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div><div><div><div><div><div>You specify it when you create the instance:<br><br></div><span style="font-family:courier new,monospace">w = SomeWidget(_dom_classes=["panel-body"])</span><br><br></div>or, in the case of class that should always get a _dom_class:<br><br></div><span style="font-family:courier new,monospace">class PanelBody(widgets.Box):<br>    def __init__(self, *args, **kwargs):<br>        super(PanelBody, self).__init__(*args, **kwargs)<br>        self._dom_classes += ("panel-body",)</span><br></div></div></div><span style="font-family:courier new,monospace"></span><div><br></div><div>You could also monkey with the kwargs beforehand, avoiding, under the covers, two calls to update_classes, but this approach is easy to read, which i think wins out.<br></div><div><br></div><div>When I asked about this on gitter, the reasoning for this change was that the add/remove class couldn't be made stateful, and that it was using extra, custom comms stuff to do something that traitlets were perfectly capable of. Thus, this traitlet. Howevever, as you can see from it having the _ prefix, this is really much more of a widget-developer functionality: it is suggested that no-fooling custom javascript be done... which is still not exactly simple.<br></div></div>
<br></div></div><span>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org" target="_blank">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></span></blockquote></div><br></div>
<br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org" target="_blank">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div><br></div>