Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notebook -- bug; @interact cell eval doesn't clear out the old html output (easy to fix?) #2884

Closed
williamstein opened this issue Apr 11, 2008 · 7 comments

Comments

@williamstein
Copy link
Contributor

To replicate this bug:

  1. Put show(plot(sin)) in a cell and press shift-enter

  2. Then in the same cell delete show(plot(sin)) and replace it by this and press shift-enter:

@interact
def _(n=(1,100)):
   print n^2
  1. Observe that the plot of sin is still there.

Component: notebook

Issue created by migration from https://trac.sagemath.org/ticket/2884

@williamstein

This comment has been minimized.

@williamstein
Copy link
Contributor Author

Attachment: sage-2884.patch.gz

@boothby
Copy link

boothby commented May 12, 2008

comment:3

The following is now broken:

plot(sin,0,1).show()
@interact
def foo(a="1"):
    a

@boothby boothby changed the title notebook -- bug; @interact cell eval doesn't clear out the old html output (easy to fix?) [negative review] notebook -- bug; @interact cell eval doesn't clear out the old html output (easy to fix?) May 12, 2008
@williamstein
Copy link
Contributor Author

comment:4

Hi,

Your only reason for giving a negative review was a claim that

plot(sin,0,1).show()
@interact
def foo(a="1"):
    a

is now "broken". However, this never did what you thought it
did. The behavior in fact hasn't changed at all from how it was
before, except to remove the bug where old graphics from
the previous version of the cell remained.

@interact by design is only supposed to work when it is
the only thing in a cell.

Having multiple interacts in a cell, having additional graphics in
a cell, having nested interacts -- none of that should work at present,
since none of it has been implemented.
They're all things that would possibly be very nice to implement,
but they were not part of the design goals for the first version
of interact.

@williamstein williamstein changed the title [negative review] notebook -- bug; @interact cell eval doesn't clear out the old html output (easy to fix?) notebook -- bug; @interact cell eval doesn't clear out the old html output (easy to fix?) May 15, 2008
@boothby
Copy link

boothby commented May 15, 2008

Attachment: 2884-docfix.patch.gz

@boothby
Copy link

boothby commented May 15, 2008

comment:5

It was not clear to me, even upon rereading the documentation, that @interact had to be alone in a cell. The attached "fixes" the issue. :)

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented May 17, 2008

comment:6

Merged both patches in Sage 3.0.2.alpha1

@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed May 17, 2008
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants