• 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: style question: when to use 'id' as return value?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: style question: when to use 'id' as return value?


  • Subject: Re: style question: when to use 'id' as return value?
  • From: Chris Suter <email@hidden>
  • Date: Tue, 18 Dec 2007 09:41:59 +1100


On 18/12/2007, at 9:36 AM, Sean McBride wrote:

Likewise, why does NSWindow's -windowController return 'id' and not
'NSWindowController*'?

I imagine that NSWindow's windowController returns id for the same reason that stringFromString: does—because it often returns a subclass of NSWindowController and therefore it returns id so that you don't have to cast.


- Chris

_______________________________________________

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: 
 >style question: when to use 'id' as return value? (From: "Sean McBride" <email@hidden>)
 >Re: style question: when to use 'id' as return value? (From: Bill Bumgarner <email@hidden>)
 >Re: style question: when to use 'id' as return value? (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: How do I get NSRect to be the same as CGRect?
  • Next by Date: Re: style question: when to use 'id' as return value?
  • Previous by thread: Re: style question: when to use 'id' as return value?
  • Next by thread: Re: style question: when to use 'id' as return value?
  • Index(es):
    • Date
    • Thread