What happens if you refer to the menu item by name? As in:
set title of menu item "myOwnMenuItem" of sub menu of menu item
"firstMainMenuItem" of main menu to myOwnTextVariable
I didn't try it. I wasn't aware that providing names to each menu
item was an option. I'll give it a try and see what happens.
An NSReceiverEvaluationScriptError: 4 usually occurs when an element
you are referring to can not be found. In such cases I always try to
get to the bottom of things like this:
I did wrap parts of the code in a try block, and that seemed to be
fine to hide the error. The main problem that then resulted is when
the user tried to select a menu since I had code along the lines of:
------
on choose menu item (theObject)
if theObject is equal to menu item 1 of menu item 3 of.....
then....
end if
end choose menu item
------
This also created errors and prevented the user from being able to
choose an option from the menu (the user was still able to select the
option via a button on the window, however).
When I can find more time I'll try your suggestions. If I have any
successes I'll report them back to this list.