Re: Custom NSManagedObject Class Initializer
Re: Custom NSManagedObject Class Initializer
- Subject: Re: Custom NSManagedObject Class Initializer
- From: Benjamin Dobson <email@hidden>
- Date: Sun, 15 Mar 2009 08:53:58 +0000
On 15 Mar 2009, at 04:03:19, Kyle Sluder wrote:
if(self = [super initWithEntity:desc
insertIntoManagedObjectContext:ctx])
{
This line will generate warnings, which is not helpful in this case.
This will not, and is the default for built-in subclasses. As such, I
prefer it:
self = [super initWithEntity:desc insertIntoManagedObjectContext:ctx];
if (self)
{
// do stuff
}
return self;
_______________________________________________
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