notebook/IPython/html/widgets/string.py
Jonathan Frederic 990303f3eb Removed require.js scheme since it forces async event driven model,
this model does not work with the comm/widget communication model.
We need to be able to load the dependencies before we send the
show() message to the widget manager.  Otherwise a race condition
will exist where the widget manager may recieve the show message
before the dependencies have been loaded (happened almost every time).
2014-01-16 10:55:59 +00:00

15 lines
473 B
Python

import os
from base import Widget
from IPython.utils.traitlets import Unicode, Bool, List
from IPython.utils.javascript import display_all_js
class StringWidget(Widget):
target_name = Unicode('StringWidgetModel')
default_view_name = Unicode('TextboxView')
js_requirements = List(["static/notebook/js/widgets/string.js"])
_keys = ['value', 'row_count', 'disabled']
value = Unicode()
disabled = Bool(False) # Enable or disable user changes