It was just my love for consistency and the wrong belief that a control is either inside a group or it's outside.
I came up to this because I had a group (tBigGroup ) containing an unknown number of controls: either fields or groups with a field inside.
In a recursive loop, supplying the ID of each control, I needed to get the text of each field (either if it was by itself or inside a group).
I already solved the problem looking for the word "group" in the long ID of each control. And there are more then enough other way do do it.
Still, it was strange to find out that I could get the content of each field using the same script:
Code: Select all
repeat for each line tID in the childControlIDs of tBigGroup
put field 1 of control tID --no matter if inside a group or by itself
end repeat
also, there is no difference between these, as long that there is only one Field in the group:
Code: Select all
put field 1 of tLongID_of_a_Group_with_a_field_inside --result: "Something"
put field 2 of tLongID_of_a_Group_with_a_field_inside --result: "Something"
put field n... of tLongID_of_a_Group_with_a_field_inside --result: "Something"