views:

40

answers:

1

Hi! Can anyone explain differences in practise between NSArrayContoller modes (Class / Entity}?

I am just facing some debugging issues in my document based Core Data desktop application (using Entity mode for all my controllers).

My database structure became quite complicated and it takes so much time to find wrong bindings (mistyped key-paths, etc..). I have also generated classes for each entity in my data model.

Would it make any difference in tracking binding mistakes if I switched all my controllers to the Class mode?

+2  A: 

Entity is for array controllers whose arrays contain Core Data managed objects.

Class is for array controllers whose arrays contain plain (not managed) objects.

So, no, switching an array controller that holds managed objects over to the unmanaged-object mode will not help.

My database structure became quite complicated and it takes so much time to find wrong bindings (mistyped key-paths, etc..).

You should get an exception about that in the Debugger Console.

Peter Hosey
-[NSManagedObject valueForUndefinedKey:]This is all I get, even with -NSBindingDebugLogLevel 1 passed at launch to executable. How to get more description? When I have 20 bug tables - looking for if is quite frustrating.
Lukasz
track down the problem by killing one binding after another. If you have the wrong keyPath given by the exception you can also open your xib with a plaintext editor and search for the key.
Martin Brugger
It seems it is the only way. Thank You.
Lukasz