Question

Ive recently started migrating a project to MagicalRecord and cant find how i would bind it to an NSArrayController in the interface builder of XCode 4.

The approach ive taken so far (besides lots of google) is making a reference to the [MagicalRecord defaultContext] and binding to that but i get an error: "Cannot perform operation without a managed object context"

Any pointers in the right direction would be really appreciated.

Was it helpful?

Solution

Make sure you turn on MagicalRecord as mentioned in the comment. You may also have to make a property in your app delegate that exposes the default managed object context provided by MagicalRecord:

- (NSManagedObjectContext *) applicationContext;
{
    return [NSManagedObjectContext MR_defaultContext];
}

This is so that binding has something to hold onto...though I've not used it in that scenario myself. Let me know how it turns out.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top