• 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: Looking at self = [super init].
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Looking at self = [super init].


  • Subject: Re: Looking at self = [super init].
  • From: Scott Ribe <email@hidden>
  • Date: Fri, 29 May 2015 13:13:38 -0600

On May 29, 2015, at 12:34 PM, Alex Zavatone <email@hidden> wrote:
>
> Then there must be a nice way to step back to the original question and see if that could be a macro.

#define CHECKED_SUPER_INIT if (!(self = [super init])) return nil

You *could* wrap it in the do expression to make it workable in if expressions etc, but that seems like overkill here, since you would always run this on its own at the top of a block.

--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
https://www.linkedin.com/in/scottribe/
(303) 722-0567 voice






_______________________________________________

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: 
 >Looking at self = [super init]. (From: Alex Zavatone <email@hidden>)
 >Re: Looking at self = [super init]. (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Looking at self = [super init]. (From: Quincey Morris <email@hidden>)
 >Re: Looking at self = [super init]. (From: Alex Zavatone <email@hidden>)
 >Re: Looking at self = [super init]. (From: Jens Alfke <email@hidden>)
 >Re: Looking at self = [super init]. (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: Looking at self = [super init].
  • Next by Date: Re: Looking at self = [super init].
  • Previous by thread: Re: Looking at self = [super init].
  • Next by thread: Re: Looking at self = [super init].
  • Index(es):
    • Date
    • Thread