Ask Your Question
1

Interact depending on other arguments

asked 2010-12-17 19:05:41 -0600

Eviatar Bach gravatar image

updated 2015-01-23 14:57:22 -0600

FrédéricC gravatar image

Hello,

Is it possible to have interact arguments depend on one another? For example, having the maximum of one slider depend on the former? I tried this:

@interact
def metacontrol(a=slider(5,10)):
    @interact
    def control(b=slider(0, a)):
        pass

But it doesn't work; updating the first slider deletes the second slider. It is possible with two cells, but this requires executing the cell which defeats the purpose of interact.

Thank you.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2010-12-18 13:19:13 -0600

kcrisman gravatar image

This is already Ticket 3836 on Trac, I think. No, it's not yet possible. The interacts will have a lot changed over the next two years with the new NSF grant, though, so this is certainly a possible change during that time.

edit flag offensive delete link more

Comments

Thank you. Once that gets implemented, interact will be much more powerful.

Eviatar Bach gravatar imageEviatar Bach ( 2010-12-19 07:19:05 -0600 )edit

See http://ask.sagemath.org/question/1061 for an update on this!

kcrisman gravatar imagekcrisman ( 2012-01-17 10:36:11 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2010-12-17 19:05:41 -0600

Seen: 212 times

Last updated: Dec 18 '10