Opened 15 years ago
Closed 15 years ago
#2884 closed defect (fixed)
[with patch; positive review] notebook -- bug; @interact cell eval doesn't clear out the old html output (easy to fix?)
Reported by: | was | Owned by: | boothby |
---|---|---|---|
Priority: | major | Milestone: | sage-3.0.2 |
Component: | notebook | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
To replicate this bug:
- Put show(plot(sin)) in a cell and press shift-enter
- 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
- Observe that the plot of sin is still there.
Attachments (2)
Change History (8)
comment:1 Changed 15 years ago by
Description: | modified (diff) |
---|
Changed 15 years ago by
Attachment: | sage-2884.patch added |
---|
comment:2 Changed 15 years ago by
Summary: | notebook -- bug; @interact cell eval doesn't clear out the old html output (easy to fix?) → [with patch; needs review] notebook -- bug; @interact cell eval doesn't clear out the old html output (easy to fix?) |
---|
comment:3 Changed 15 years ago by
Summary: | [with patch; needs review] notebook -- bug; @interact cell eval doesn't clear out the old html output (easy to fix?) → [with patch; negative review] notebook -- bug; @interact cell eval doesn't clear out the old html output (easy to fix?) |
---|
comment:4 Changed 15 years ago by
Summary: | [with patch; negative review] notebook -- bug; @interact cell eval doesn't clear out the old html output (easy to fix?) → [with patch; needs review] notebook -- bug; @interact cell eval doesn't clear out the old html output (easy to fix?) |
---|
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.
Changed 15 years ago by
Attachment: | 2884-docfix.patch added |
---|
comment:5 Changed 15 years ago by
Summary: | [with patch; needs review] notebook -- bug; @interact cell eval doesn't clear out the old html output (easy to fix?) → [with patch; positive review] notebook -- bug; @interact cell eval doesn't clear out the old html output (easy to fix?) |
---|
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. :)
comment:6 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Merged both patches in Sage 3.0.2.alpha1
The following is now broken: