I have a situation where I am asking a Layout for all of its children. The children are a mix of Option Menus and Text Fields. I need to go through the list of children and ask them what is the currently selected item in the drop down, and what is currently typed into your field.
The control command seems like the ideal solution, except it doesn't appear to let you query the control for its current value - it only lets you query common attributes like height and width.
My solution, which feels like a huge hack, is to just annotate the controls with "option" or "text" and then use the control command to retrieve the annotation and based off that use the specific optionMenu and textField commands to query the current values.
My question is - is there a way to query the type of a UI control? Or, is there a way to get the value of a control without knowing what kind of control it is?
Thanks.