sagemath/sagecell — pull request #418 by ihanson (2013-07-02 22:30:25+00:00)
Title: Interact update issues

There are some lingering issues with the interact update:

- [ ] the slider is now wider by default, which makes the default textbox width look too narrow. Compare:

```python
@interact
def f(n=(0,1), y=x^2):
print n,y
```
- [ ] the function name isn't defined the first time the function is run, so this gives an error:

```python
@interact
def f(n=(0,1)):
print f.n
```

- [ ] dynamically added controls don't respect an update button:

```python
@interact
def f(n=(0,1), auto_update=False, **kwargs):
print n, kwargs
f.x=1 # the control for x doesn't wait for the update button to be pressed
f._update()
```

- [x] http://www.math.ualberta.ca/~novoseltsev/2013Winter215Q1/VC01_vector_fields_public.html doesn't work anymore

- [x] fix (possibly correct): 0f4d5e8056393717b49daaa9199c76230c8fc921 Changes to the adapter functions mean this doesn't work (I think it used to work):

```python
def to_value(l):
return map(SR, map(str, l[0]))
@interact
def _( tuv=input_grid(1,6, label=r"$tuv$-limits:", default=[0, 4*pi, 0, 2*pi, -1, 1], width=6, to_value=to_value)):
print tuv
```

- [ ] The `._changed` attribute is incorrect in this situation:

```python
changed=[]

@interact
def f(self, n=(0,1), **kwargs):
global changed
changed.append(self._changed)
print changed
if len(changed)<2:
self.x=4
self._update()
```