#5220: [with patch, needs review] Weird or non-appearance of default in
input_box
in interact
----------------------+-----------------------------------------------------
Reporter: kcrisman | Owner: boothby
Type: defect | Status: new
Priority: major | Milestone: sage-3.4.1
Component: notebook | Keywords:
----------------------+-----------------------------------------------------
Comment(by jason):
See the mailing list discussion at http://groups.google.com/group/sage-
support/browse_thread/thread/c01b61836bc53339/00cebbec4da5304c for how
interact changes after this patch. Basically, doing:
{{{
@interact
def plotfunction(f=input_box('x^2')):
print f
}}}
used to make an input box with x^2 in it. Now it literally puts the
string 'x^2' (with quote marks) in the input box. In order to make an
input box with x^2 in it after the patch, you need to do:
{{{
@interact
def plotfunction(f=input_box(x^2)):
print f
}}}
or even
{{{
@interact
def plotfunction(f=x^2):
print f
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5220#comment:5>
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
-~----------~----~----~----~------~----~------~--~---