Re: Subclassing NSManagedObject issue [solved - kinda]
Re: Subclassing NSManagedObject issue [solved - kinda]
- Subject: Re: Subclassing NSManagedObject issue [solved - kinda]
- From: T Reaves <email@hidden>
- Date: Mon, 23 May 2005 20:53:37 -0400
On May 22, 2005, at 9:06 PM, mmalcolm crawford wrote:
On May 22, 2005, at 5:50 PM, T Reaves wrote:
My understanding from the documentation and the sample code I
looked at implies all I need do is what I've done. However, when
I run my app (at this point I've no real data, so I deleted the
XML data file), the object I've subclassed from NSManagedObject no
longer works. When I try to add (via the array controller), I now
get:
*** NSRunLoop ignoring exception 'Failed to create new object'
that raised during posting of delayed perform with target 4916980
and selector 'invokeWithTarget:'
There's an inconsistency somewhere -- in your model you've probably
specified a custom class name for an entity and the custom class
doesn't exist in your app. Check for spelling mistakes...
Well, this is interesting.
I was pretty sure I had no typo, but you never know. So I
looked, and looked again. Nothing. The only thing I could think of
that was different about this was that when I created on of my two
trial classes (subclasses of NSManagedObject) I had inadvertently
made the class name plural (added an 's'). But I had renamed the .h
& .m files, and updated the class name in both files. I even
confirmed (again) no typos.
But I'm a paranoid person. So I deleted the .h & .m, then re-
created them sans 's'. That worked. To be sure I had not over
looked anything, I even compared the new files with source control,
and it was the same.
Is it possible that a file somewhere was not getting properly
cleaned from where I had renamed the file? Does XCode do anything
with the cache for zero link or something that would explain this
behavior?
Just wondering...
Thanks to Chris and mmalcolm for their hard work in answering
all my (odd, misguided) questions!
_______________________________________________
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