• 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: Problem chaining initialization methods
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem chaining initialization methods


  • Subject: Re: Problem chaining initialization methods
  • From: Dave DeLong <email@hidden>
  • Date: Sun, 03 Jan 2010 19:42:41 -0700

A simple glance over looks like you're missing the assignation to self.

Shouldn't it be if (!(self = [self initWithArray:arr forKeyPath:keyPath andTitle:capPath])) { ... ?

Dave

On Jan 3, 2010, at 7:36 PM, Mike Chambers wrote:

> So, does anyone see anything obviously wrong with how I am chaining
> the initializers below?
>
> -(id)initWithArray:(NSArray *)arr forKeyPath:(NSString *)keyPath
> {
> 	NSString *capPath = [keyPath capitalizedString];
> 	if(![self initWithArray:arr forKeyPath:keyPath andTitle: capPath]);
> 	{
> 		return nil;
> 	}
>
> 	return self;
> }

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: 
 >Problem chaining initialization methods (From: Mike Chambers <email@hidden>)

  • Prev by Date: Problem chaining initialization methods
  • Next by Date: Re: Problem chaining initialization methods
  • Previous by thread: Problem chaining initialization methods
  • Next by thread: Re: Problem chaining initialization methods
  • Index(es):
    • Date
    • Thread