
The FOX GUI has exactly this capability, you can connect a variable directly to the widget, without requiring any glue code at all. In fact, you can connect the same variable to multiple widgets at the same time (eg a 'spinner' widget and an 'editeline'), without requiring the programmer to write any type of callback mechanism.
This works because all GUI events are bi-directional. For more information, read: http://www.fox-toolkit.org/datatarget.html
That seems a lot of code, compared to: http://www.torjo.com/win32gui/save_dlg.html Not to say about validation...
The problem with this implementation is that the 'user_name' field cannot (usually) connect to more than one widget at a time. Also, most widget libraries dont allow you to connect a variable to a widget, and still allow user validation. This is because the widget library doesn't callback into the validation code, since it assumes that if it is connected to a widget, then no validation code is necessary. Mathew