enthought/enaml — Issue #56: confusion re scoping in user-defined component
Author: jdmarch
Created: 2011-12-30 18:13:39+00:00
State: open

I get NameError on chk in line 2, but the same line works fine when uncommented inline. What am I doing dumb here?

```
MyField(Field):
value << str(chk.checked)

defn MainWindow():
Window:
Form:
Label:
text = 'foo'
MyField:
#value << str(chk.checked)
pass
Label:
text = 'bar'
CheckBox:
id: chk
```