Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Trac #9976: #9976: Some syntax fixes in the documentation of interacts.

  • Loading branch information...
commit f569ba6409edf00de370b469e07dce9f385dcd39 1 parent 2f81449
@simon-king-jena simon-king-jena authored
Showing with 8 additions and 3 deletions.
  1. +8 −3 sagenb/notebook/interact.py
View
11 sagenb/notebook/interact.py
@@ -26,12 +26,14 @@
** PLANNING **
NOTES:
+
* There is no testing of pickling anywhere in this file. This is
because there is no reason one would ever pickle anything in this
file, since everything is associated with particular state
information of a notebook.
BUGS:
+
[x] have default values set from the get go
[x] spacing around sliders; also need to have labels
[x] when re-evaluate input, make sure to clear output so cell-interact-id div is gone.
@@ -61,6 +63,7 @@
[x] what do published worksheets do??
VERSION 1:
+
[X] get sliders to work; values after move slider
[x] default values
[x] NO -- autoswitch to 1-cell mode:
@@ -85,11 +88,13 @@
such requests from the queue in worksheet.py
DOCS:
+
[x] 100% documentation and doctest coverage
[ ] put the docs for this in the reference manual
[ ] put summary doc in notebook help page
VERSION 2:
+
[ ] vertical scroll bars (maybe very easy via jsquery)
[ ] small version of color selector
[ ] button -- block of code gets run when it is clicked
@@ -803,7 +808,7 @@ def _adaptor(self, value, globs):
return sage_eval(value, globs)
def interact(self, *args):
- """
+ r"""
Return a string that when evaluated in JavaScript calls the
JavaScript :func:`interact` function with appropriate inputs for
this control.
@@ -989,7 +994,7 @@ def value_js(self):
return 'this.value'
def render(self):
- """
+ r"""
Render this control as a string.
OUTPUT:
@@ -2895,7 +2900,7 @@ def __init__(self, nrows, ncols, default=None, label=None, to_value=lambda x: x,
- ``width`` - an integer; size of each input box in characters
- NOTEBOOK EXAMPLE:
+ NOTEBOOK EXAMPLE::
@interact
def _(m = input_grid(2,2, default = [[1,7],[3,4]],
Please sign in to comment.
Something went wrong with that request. Please try again.