Hi all…
I’m experiencing some strange issues with the dropdown menus in applescript studio (popup buttons). I’ve added an extra 3 menu items into the list and the actual popup is on a panel that is attached to the main window …
I’ve checked the “Menu > Choose Menu Item” handler in Applescript and without adding any extra code to the handler I get this error …
If any one can give me any pointers as to what I may have done wrong I’d be very grateful! The rest of the app seems to be working fine … I’m just stumped with this weird problem!
Thanks a lot!
-Mel
Hi,
it’s obviously a wrong reference.
Without any code it’s hard to find the cause
All I have regarding this handler is this …
on choose menu item theObject
-- No code is even in here!
end choose menu item
In Interface Builder, I have set the MENU ITEM’s handler to “menu > on choose menu item” so that should work right?
You said its a bad reference … what should I check to look for references?
Thanks!
PS
something that just occured to me is because this object is in a Panel Window attached to the main window, do I need to make the Panel the first responder? What’s the syntax to make a PANEL the first responder? Thanks!
I figure it out … God damn Popup syntax! LOL
I had to set the handler onto the ACTUAL popup button and not the menu item … Which I found extremely strange! Anyway, for anyone else experiencing what I did the code you want is this:
on choose menu item theObject
if name of current menu item of theObject is "name of menu item" then
-- do something here!
end if
end choose menu item
That’s why I’ve asked for the code