Re: Object from valueForKey is invalid
Re: Object from valueForKey is invalid
- Subject: Re: Object from valueForKey is invalid
- From: Theo Vosse <email@hidden>
- Date: Tue, 27 Sep 2005 14:57:20 +0200
Hi,
Last week, I wrote
I've created a slightly strange mixture of my own document structure
and an NSPersistentDocument with a controller, an unholy marriage,
some might say.
...
The problem is that I cannot obtain the text from inside the program.
... The number of selected sentences seems to be correct,
but the object that ends up in the variable "text" is invalid (i.e.,
it is an NSCFString object, whose description is "Invalid").
Nobody responded, and I still don't know what caused the problem, but
I did find a way around it.
Instead of adding an instantiation of a (sub-class of)
NSPersistentDocument to the nib file, I made the file owner a
delegate for managedObjectContext and managedObjectModel, much like
the CoreData template in XCode does (but without the implicit use of
a file that is in the template), and bound the array controller to
the file owner object. That did the trick.
I still have a question though: how come the objects appear in a
different order, each time I open the (same) document?
Theo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden