Re: [Solved - duh!] Core data storage of objects whose class is loaded from a bundle
Re: [Solved - duh!] Core data storage of objects whose class is loaded from a bundle
- Subject: Re: [Solved - duh!] Core data storage of objects whose class is loaded from a bundle
- From: Rick Hoge <email@hidden>
- Date: Fri, 30 Jan 2009 08:26:15 -0500
Thanks for the replies - it's clear that it's a problem in my NSCoding
support (see comment below)
On 29-Jan-09, at 5:18 PM, Nick Zitzmann wrote:
On Jan 29, 2009, at 2:32 PM, Rick Hoge wrote:
-(id)initWithCoder:(NSCoder*)decoder {
self = [super initWithCoder:decoder]; // Returns instance of parent
class
return self;
}
which was returning an instance of the parent class and not the
subclass.
Then you've got something strange going on, because initializing the
superclass shouldn't be setting the object _to_ the superclass;
that's the responsibility of whoever allocated the class to set the
class. So either you're allocating the wrong class, or your
superclass is doing something unorthodox.
It turns out the superclass, which inherits from NSObject, is
initializing with [[ParentClass alloc] init] instead of [super
initWithCoder:decoder] - perhaps this is the problem...
Nick Zitzmann
<http://www.chronosnet.com/>
(43092.6825)
_______________________________________________
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