• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [Solved - duh!] Core data storage of objects whose class is loaded from a bundle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Core data storage of objects whose class is loaded from a bundle (From: Rick Hoge <email@hidden>)
 >Re: [Solved - duh!] Core data storage of objects whose class is loaded from a bundle (From: Rick Hoge <email@hidden>)
 >Re: [Solved - duh!] Core data storage of objects whose class is loaded from a bundle (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: How to find whether the file exists on Hard disk or othe mounted devices?
  • Next by Date: Debugging a process that received Signal
  • Previous by thread: Re: [Solved - duh!] Core data storage of objects whose class is loaded from a bundle
  • Next by thread: re: Core data storage of objects whose class is loaded from a bundle
  • Index(es):
    • Date
    • Thread