1 | initial version |
An alternative; if yon't mind getting your hands dirt (i.e. side effects)
The return is a tuple (master, secondary, secondary limit) The last is just for debugging. An alternative is to not allow the "illegal" selection.
@interact
def myfunc(x=(0,10)):
#sage_interactive(myfunc1, y=(0,floor(x/2)))
pass
@interact
def myfunc1(y=(0,10)):
return y
def get_value():
gg=myfunc.widget.children[0].value
#print('gg= ',gg,' floor= ',floor(gg/2))
myfunc1.widget.children[0].max=floor(gg/2)
return myfunc.widget.children[0].value,myfunc1.widget.children[0].value, myfunc1.widget.children[0].max
I left some debugging junk in.
Tip: The secret is to use
f.?
f.children?
f.widget.children?
Often!
`