I think I disagree with this change in behavior.  One (major) point of
interact is to be very user-friendly.  Needing to input functions as
strings is not user-friendly.

-Marshall

On Feb 9, 10:26 pm, Jason Grout <jason-s...@creativetrax.com> wrote:
> kcrisman wrote:
> > Dear Support,
>
> > On sagenb.org, try making an interact with an input box explicitly
> > defined, e.g.
>
> > @interact
> > def plotfunction(f=input_box(x^2)):
> >     P=plot(f,0,1)
> >     show(P)
>
> > It works fine in the sense that whatever you type in does what it
> > should.  But what's up with how the input box appears?  It's even
> > worse on my box (PPC OSX.4) - the initial input does not show up *at
> > all* in the box, though again the plot is fine and once you type
> > something in it behaves normally.
>
> > Any suggestions as to what I'm doing wrong would be appreciated.  Or
> > is it still fallout from TinyMCE or something like that?
>
> This is a str versus repr problem.  I've attached a patch to #5220 which
> fixes it, but this patch also changes how interact deals with strings.
> The patch should be discussed before applying, I think, since it changes
> the way strings work as arguments to interact things.
>
> @interact
> def plotfunction(f=input_box('x^2')):
>      print f
>
> before used to give a box with x^2 in it.  With the patch at #5220, it
> gives a box with 'x^2' in it (note it is now explicitly a string).
>
> To prevent applying without discussion, I intentionally left the two
> existing doctests of the affected function broken.  I figured that would
> stop mabshoff from applying the patch until discussion happened and
> someone cared enough to fix the existing doctests :).
>
> I think the correct behavior should be the behavior with the patch.
>
> Thanks,
>
> Jason
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to