#5194: [with patch; with positive review] add option to turn off automatic
updates
for an interact
-------------------------+--------------------------------------------------
Reporter: john_perry | Owner: mhansen
Type: enhancement | Status: closed
Priority: minor | Milestone: sage-3.4.1
Component: notebook | Resolution: worksforme
Keywords: |
-------------------------+--------------------------------------------------
Changes (by john_perry):
* status: assigned => closed
* resolution: => worksforme
* summary: [with patch; needs review] add option to turn off automatic
updates for an interact => [with patch; with
positive review] add option to turn off
automatic updates for an interact
Comment:
The second patch does exactly what I would have liked. It is unfortunate
that the output is deleted, but the current situation is much better than
the previous one. In addition, it adds some infrastructure for a button
object to interact, although anything beyond the Update button is non-
trivial to get working.
The only caution I would issue is that when I ran {{{sage -t}}} I
initially encountered the following failure:
**********************************************************************
File "/home/software/sage-3.2.1/devel/sage-
main/sage/server/notebook/interact.py", line 677:
sage: sage.server.notebook.interact.InputBox('theta', 1).render()
Expected:
'<input type=\'text\' value="1" size=80 onchange=\'interact(0,
"sage.server.notebook.interact.update(0, \\"theta\\", ...,
sage.server.notebook.interact.standard_b64decode(\\""+encode64(this.value)+"\\"),
globals());sage.server.notebook.interact.recompute(0)")\'></input>'
Got:
'<input type=\'text\' value=\'1\' size=80 onchange=\'interact(0,
"sage.server.notebook.interact.update(0, \\"theta\\", 27,
sage.server.notebook.interact.standard_b64decode(\\""+encode64(this.value)+"\\"),
globals());sage.server.notebook.interact.recompute(0)")\'></input>'
**********************************************************************
This appears to be due to a difference in code that your patch did not
update: once I changed the relevant line to return {{{value="%r"}}} and
{{{value="%s"}}} instead of {{{value='%r'}}} and {{{value='%s'}}} this
worked. Maybe I was missing some intermediate patch?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5194#comment:6>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---