Can’t seem to find an answer to this, any help would be greatly appreicated. I am simply trying to select the item of a combo that I just added.
tell combo box "photographer" of window 1
make new combo box item at end of combo box items with data newPhotographer
set current item to (first item whose title is newPhotographer)
end tell
It adds to the end of the combo box with out problem but I can’t seem set current item to it. Would the best approach be to count the items then
this deals with setting the current item, seems that counting is the way
on awake from nib theObject
set newPhotographer to "Budgie" --as text
tell combo box "photographer" of window 1
make new combo box item at end of combo box items with data newPhotographer
set current item to 1
end tell
end awake from nib
I got it working after trying a few more things. Hope this saves someone a little time.
tell combo box "photographer" of window 1
make new combo box item at end of combo box items with data newPhotographer
set currnetlist to every combo box item of combo box "photographer" of window 1
set num_photographer to count currnetlist
set current item to num_photographer
end tell