• 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: Custom NSManagedObject Class Initializer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Custom NSManagedObject Class Initializer (From: Richard Somers <email@hidden>)
 >Re: Custom NSManagedObject Class Initializer (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Messages between Threads
  • Next by Date: Representation of the entire window
  • Previous by thread: Re: Custom NSManagedObject Class Initializer
  • Next by thread: [Q] inconsistent naming for Core Graphics and Foundation?
  • Index(es):
    • Date
    • Thread