Re: Core Data: rare exception
Re: Core Data: rare exception
- Subject: Re: Core Data: rare exception
- From: "I. Savant" <email@hidden>
- Date: Mon, 8 Oct 2007 20:39:29 -0400
May be you did not read the last part of the first mail, but here it
is how to reproduce the error:
Sure I did, but you don't seem to have read the How To Ask
Questions the Smart Way link you were sent (or you simply ignored it).
I say this because you're still not providing all the details. See
below ...
-create a new Core Data Document based app
Okay.
-in the model, create 3 entities, say A,B,C
Done.
-in each entity add an attribute, say "string/name" with default
value "hola", and create the relationships A<-->>B<-->>C
Easy enough.
-in the Document.nib, create 3 array controllers, one for each
entity, bind them to the file's owner managedDocumentContext and in
B and C also bind the contentSet to the appropriate controller
Here's where we run into trouble. What do you mean by 'bind the
contentSet to the appropriate controller'? The great thing about array
controllers is they're so flexible, many configurations are
'appropriate' depending on your application's requirements. What's
appropriate for yours? Answer: I don't know unless you tell me. Please
specify *in detail* how these are bound.
Also, the default settings for an array controller are set to
"Mode: Class" and "Class Name: NSMutableDictionary". In your project,
have you set "Mode: Entity" and "Entity Name: appropriate-name-here"?
Conceivably, if you have not, calling the -add: action on the array
controller will create a dictionary, not an instance of your entity,
which could also conceivably produce the error you mentioned (a
dictionary being sent an improper message).
It'd help if you'd avail yourself of one of the many file sharing
sites and upload your project there (or a simplified test case). That
way, we can see exactly what you're seeing without the need for you to
provide all the details.
--
I.S.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden