撤消核心数据更改的操作名称
我正在寻找一种内置(或易于实现)的方法来让核心数据撤消/重做操作名称读起来像“撤消编辑名字”,而不是像它们那样简单地“撤消”或“重做”默认情况下。
我有一个 Core Data 应用程序,并使用它的 NSUndoManager 作为窗口的撤消管理器。它工作得很好,但是当用户对字段进行更改(从 NSTableView
内联)时,“撤消”菜单项的标题不会反映哪个字段发生了更改。
我按照苹果的 教程(略有调整,因为我的应用程序不是基于文档的),以及 核心数据文档,但我的菜单标题仍然是“撤消”和“重做”。
I'm looking for a built-in (or easy-to-implement) way to get Core Data undo/redo action names to read like "Undo edit First Name", rather than simply "Undo" or "Redo" as they do by default.
I have a Core Data application, and am using its NSUndoManager
as my window's undo manager. It works great, but when a user makes a change to a field (inline from an NSTableView
), the Undo menu item's title doesn't reflect which field changed.
Initial searching led me to the same question posted on Apple Mailing Lists in January 2007. The only answer ever posted responds with "Search for 'Model.strings' in the Core Data Programming Guide." I didn't have a Strings file for my Model, so I created one (localized in my en.lproj directory and with UTF-16 encoding), but this made no difference.
I followed instructions from Apple's tutorial (adapted slightly since my app is not Document-based), and the Core Data documentation, but my menu titles still read "Undo" and "Redo".
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您的 NSManagedObject 子类中添加
In your NSManagedObject subclass add