How do I populate a popup button?
Well, I've found this snippet of code here and in various place around the 'net:
tell window 1 tell menu of popup button 1 delete every menu item repeat with catListItem in catList make new menu item at end of menu items with properties {title:catListItem} end repeat end tell end tell
When I use it in my AppDelegate script in a Cocoa-AppleScript Application, Xcode gives me an error: "t2t_AppDelegate.applescript:25: error: Expected end of line but found identifier. (-2741)" Line 25 is "tell menu..."
I'm not sure what I'm missing that would allow me to dynamically populate the popup button with a list of terms (catList) that I'm drawing from another application. Any suggestions?
Mac OS X (10.7.4), iMac (20-inch, Early 2008)