ネットのさまざまな場所で、このコードのスニペットを見つけました。
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
Cocoa-AppleScript アプリケーションの AppDelegate スクリプトで使用すると、Xcode で次のエラーが表示されます。(-2741)* (25 行目は「tell menu...」)
別のアプリケーションから描画している用語のリスト(catList)をポップアップボタンに動的に入力できるようにするために何が欠けているのかわかりません。助言がありますか?