Array of GUI elements?

hi there,

I have a couple of NSPopUpButtons in a view of my ASS app
and I don’t want to access each one of them from within the
source code via the identifier assigned in the “AppleScript”
part of the Inspector.
Instead I want to address them in some kind of array or list
(I think the array concept from languages like Pascal or C
isn’t there in AppleScript, right? AppleScript is List based,
right?)

However, it would be great if I could access my bunch of
PopUpButtons like this:


repeat with i from 1 to theNumberOfPopUpButtons
   set visible of popup button thePopUpButtons[i] of window "main"
end repeat

But, again, the array concept with the [] operator is not
available in AppleScript if I got that right.

It could, of course, be done with a list of PopUpButtons but
is there a way to tell InterfaceBuilder already that this and
that and that and that NSPopUpButton share one identifier
and will be access in the source code using an index of a
List?

Or do I have to give each PopUpButton its unique identifier
in InterfaceBuilder and then build a List in my AppleScript
source code of these individual identifiers by my own?

Any ideas?

Thanks a lot!
Stefan.

aha! okay! didn’t know that!

that’s close …

unfortunately, there are other popup buttons in the view
that will have to be treated in another way, not like the
other group of popup buttons I want to treat in one way…

but thanks anyway, I guess I can modify it a little bit to
suit my needs.

Stefan.