开发者

Cocoa CoreData and non-Document-Based Application

i have a Problem wich drives me crazy... I want to "write" a Cocoa CoreData Application, write is not the exact term, bec开发者_开发知识库ause the Application should be created with Bindings.

It was no Problem to create a Document-Based Application, it works fine. But i want a Non-Document-Based Application, so I thought "Do the same like at the Document-Based App", but if I do so the Application do not start. XCodes' GDB says:

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.'

So I googled on this, but found nothing helpful (or probably I was just too unexperienced... ). But I found a Tutorial (http://www.raywenderlich.com/934/core-data-tutorial-getting-started) and tried it without Bindings but this neither works.

So my Question is how do I create a Non-Document-Based Application using Core Data?

Here's my Code, the Password is stackoverflow.

Thanks for any Ideas... Dennis


Bind the NSArrayController managedObjectContext to your AppDelegate not to Files's owner.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜