【发布时间】:2012-09-04 16:41:42
【问题描述】:
我在“网络”周围的各个地方都发现了这个 sn-p 代码:
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 给我一个错误:*t2t_AppDelegate.applescript:25: error: Expected end of line but found identifier。 (-2741)*(第 25 行是“告诉菜单...”)
我不确定我错过了什么,这将使我能够使用从另一个应用程序中提取的术语列表 (catList) 动态填充弹出按钮。有什么建议吗?
【问题讨论】:
标签: applescript