How to reference textfieldbrowsing

I'm just starting to play with the ui module. I created a simple test program and ui with a textfield on it using the ui tool. I can't figure out how to get a reference to the text field so can access it from the code.

You can access the different views with a dictionary like syntax, and you access them with their names. If you load the main view to a variable (let's call it <I>root_view</I>), you can access the textfield view like this: root_view['textfield1'] (<I>textfield1</I> is the default name)<br>
The textfield view has an additional variable named text, which of course stores the text data, and is accessed like this: root_view['textfield1'].text