Adding TextBoxes in loop


I’d like to add TextBox for each master so I tried this:

for m in Font.masters:
     self.w["text_"+str(i)] = vanilla.TextBox(...)

But got an error:
TypeError: ‘FloatingWindow’ object does not support item assignment

So how can I dynamically add vanilla controls to the window?


You probably get better answers on the robofab list.

You need to do work with eval() in this case. Take a peek into my Floating Features script.

exec ?

Yeah, sorry, confused it myself: