【发布时间】:2010-07-14 09:16:02
【问题描述】:
我有一个问题让我发疯... 我想“写”一个 Cocoa CoreData 应用程序,写不是确切的术语,因为应用程序应该使用 Bindings 创建。
创建基于文档的应用程序没有问题,它工作正常。 但我想要一个非基于文档的应用程序,所以我想“在基于文档的应用程序上做同样的事情”,但如果我这样做,应用程序就不会启动。 XCodes 的 GDB 说:
2010-07-14 11:02:39.894 nonDocBased[1242:a0f] An uncaught exception was raised
2010-07-14 11:02:39.899 nonDocBased[1242:a0f] [<NSApplication 0x100408e90> valueForUndefinedKey:]: this class is not key value coding-compliant for the key managedObjectContext.
2010-07-14 11:02:39.902 nonDocBased[1242:a0f] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<NSApplication 0x100408e90> valueForUndefinedKey:]: this class is not key value coding-compliant for the key managedObjectContext.'
所以我用谷歌搜索了这个,但没有发现任何帮助(或者可能我太缺乏经验了......)。 但是我找到了一个教程 (http://www.raywenderlich.com/934/core-data-tutorial-getting-started) 并在没有绑定的情况下尝试了它,但这都不起作用。
所以我的问题是如何使用 Core Data 创建非基于文档的应用程序?
这是我的Code,密码是stackoverflow。
感谢您的任何想法... 丹尼斯
【问题讨论】:
标签: cocoa core-data document-based