Jonathan Frederic
673577cf6c
Merge pull request #5207 from Zaharid/childfireevent
...
Children fire event
2014-02-28 13:47:21 -08:00
MinRK
d8b6a1a0ba
don't validate ContainerWidget.children
...
just use a plain Tuple, so we don't have to define a new Trait
2014-02-25 19:08:43 -08:00
MinRK
cc1ba8b1f7
remove incorrect is instance check in children_changed
2014-02-25 15:00:48 -08:00
MinRK
c89ec19fca
don't check shape of ContainerWidget.children
2014-02-25 14:37:12 -08:00
Jonathan Frederic
7855de2f13
s/CTuple/Tuple
2014-02-25 13:50:58 -08:00
Jonathan Frederic
dedbc3b0e1
Changed children list to CTuple.
...
Also removed some unused refences in the widget code
and added support for tuples in the pack/unpack code.
2014-02-25 09:46:27 -08:00
zah
439003d709
Children fire event
...
Now when a container widget is displayed, the _handle_displayed method
of each of its children is fired.
2014-02-23 20:31:39 +01:00
Brian E. Granger
708c30c912
Merge pull request #5136 from minrk/interact-default
...
set default value from signature defaults in interact
2014-02-21 16:28:52 -08:00
MinRK
62f318c777
undo failed changes
...
before raising
otherwise, invalid values were still accepted
2014-02-20 22:57:01 -08:00
MinRK
b51cc50357
further tests for default values in interact
...
both valid and invalid
2014-02-20 22:37:04 -08:00
MinRK
acfc2d5308
set default value from dict
2014-02-20 22:36:42 -08:00
Jonathan Frederic
0eebd9e05b
Added msg_throttle sync=True widget traitlet
2014-02-20 08:41:05 -08:00
MinRK
e91ef370dd
remove no-op adding abbreviations from always-empty dict
2014-02-16 15:17:23 -08:00
MinRK
8a2d92010a
set default value from signature defaults in interact
...
If available, use the default value from the signature for the initial condition,
when using range/choice abbreviations.
Not affected:
- single-value abbreviations (`@interact(a=5)` sets `a=5`)
- explicit Widgets
2014-02-16 15:11:39 -08:00
MinRK
d772b4c3da
catch errors at a lower level in interact
...
for cleaner tracebacks in the interact callback than the fallback case
2014-02-07 16:51:10 -08:00
MinRK
ddc22152ea
show traceback in widget handlers
...
rather than logging
closes #5064
2014-02-07 16:43:49 -08:00
MinRK
813e32dfea
set readout=True as default on SliderWidgets
2014-02-07 11:16:46 -08:00
MinRK
7861bee65f
test widget interaction (Python)
2014-02-06 17:06:08 -08:00
MinRK
6d555b7aee
return f with @interact, not just @interact(**kwargs)
2014-02-06 17:06:08 -08:00
MinRK
031b69895c
fix ValueError format message
2014-02-06 17:06:07 -08:00
MinRK
48a56d3156
simplify float/int slider abbreviation logic
...
fixes unhanded case where only one entry is a float
2014-02-06 17:06:07 -08:00
MinRK
7911c6c237
finish removing *args support
2014-02-06 17:06:07 -08:00
MinRK
ad6109692d
ensure range widgets get value that is on a step
2014-02-06 17:06:07 -08:00
MinRK
a58ca8a0a0
s/const/fixed/
2014-02-06 17:06:07 -08:00
MinRK
2d2c5beb0e
move @annotate to py3compat
2014-02-06 17:06:07 -08:00
MinRK
3053a855a9
remove positional arg support from interact
2014-02-06 17:06:06 -08:00
MinRK
feab63754d
update interact now that SelectionWidget.values is a dict
2014-02-06 17:06:06 -08:00
Brian E. Granger
88fb17b182
Adding const pseudo-widget for fixing arguments to interact.
2014-02-06 17:06:06 -08:00
Brian E. Granger
6e8c63ea19
Adding decorator forms of interact. Yeah!
2014-02-06 17:06:05 -08:00
Brian E. Granger
dd9a6efaed
Utter interact insanity.
...
This involves a bunch of really complicated logic to handle the
different ways that function parameters can be processed in Python.
Most importantly, this includes support for *args in interact.
2014-02-06 17:06:05 -08:00
Brian E. Granger
55cddce784
Fixing interact imports.
2014-02-06 17:06:05 -08:00
Brian E. Granger
2ef393aaa3
Renaming interact.py->interaction.py to improve imports.
2014-02-06 17:06:05 -08:00
Thomas Kluyver
a96c228554
Get widgets from function annotations and default arguments.
...
Also, preserve the order of function parameters from the signature where
possible.
This uses a backport of the Python 3.3 signature machinery that @minrk
found and improved.
2014-02-06 17:06:05 -08:00
Brian E. Granger
5853bb8ff7
Adding .widget to function.
2014-02-06 17:06:04 -08:00
Brian E. Granger
93047f1d3c
Updating interact to work with latest state of widgets.
2014-02-06 17:06:04 -08:00
Brian E. Granger
faebb43e01
Updating interact to new APIs.
2014-02-06 17:06:04 -08:00
Brian E. Granger
1d6cde4877
Adding interact.py.
2014-02-06 17:06:04 -08:00
MinRK
5823b875eb
don't allow empty selection in selection widgets
...
raises KeyError on failed lookup (in both directions)
2014-02-04 10:38:26 -08:00
MinRK
ca0afa1d8b
value_names is read-only
2014-02-03 17:15:06 -08:00
MinRK
3e1f2e22f8
Make SelectionWidget.values
a dict
...
rename 'labels' and '_value' to 'value_names' and 'value_name'.
To specify a mapping of value names and values, use a dict.
If you specify `values=[list]`, then an OrderedDict will be used.
Assignment after construction only supports a dict.
2014-02-03 17:15:06 -08:00
Brian E. Granger
2b7310f794
Merge pull request #4933 from jdfreder/widget-model-name
...
Small Widget inconsistency fixes
2014-02-03 12:38:03 -08:00
Brian E. Granger
cef93c8cfb
Adding initial version of readout to sliders.
2014-01-31 20:56:12 -08:00
Thomas Kluyver
c633256fc9
Fix some formatting in widget docstrings
2014-01-29 14:55:12 -08:00
Jonathan Frederic
865c7330a9
s/model_name/_model_name
2014-01-29 12:37:30 -08:00
Jonathan Frederic
75b148d40b
Renamed widgets...
...
TextWidget, TextareaWidget, CheckboxWidget, and SelectWidget
2014-01-28 12:51:24 -08:00
MinRK
36db60eacb
review pass on Python-side of widgets
...
- remove variable signature complexity
- use a few more traitlets as appropriate
2014-01-26 15:46:06 -08:00
Jonathan Frederic
e793d022b5
Callback dispatcher return callback value.
...
Also import it with the widgets namespace so it can be used elsewhere.
2014-01-23 10:52:33 -08:00
Jonathan Frederic
00b39af9cf
Fixed type in container
...
._children was not being set... Instead the value was being returned (useless).
2014-01-23 09:12:05 -08:00
Jonathan Frederic
91e82218a8
Changed selection widget API to use labels list
...
for mapping custom str reprs to items in the selection list
2014-01-22 17:15:10 -08:00
Jonathan Frederic
288b8a0ced
s/view_name/_view_name
2014-01-22 16:21:00 -08:00