Closed theodox closed 8 years ago
The alternative paradigm would be to add a 'find' command to all layouts which looked for a name in their children. Right now this works:
from mGui.gui import *
with Window(None) as test:
with ColumnLayout(None):
Button("fred")
test.show()
for item in test: print item
fred = [i for i in test if i.Key == 'fred'][0]
fred.label = 'found'
Too much work. it's easier to simply use vanilla python to hack property assignments like this.
We track names for path access. We should also track allow some method to generate variables on the top level control of a group that tells parent controls to collect it. Here's the idiom i have in mind:
but we'd keep existing behavior so
w.important
would be the same as