• 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: compiler error related to 'save' method of NSUserDefaultsController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compiler error related to 'save' method of NSUserDefaultsController


  • Subject: Re: compiler error related to 'save' method of NSUserDefaultsController
  • From: Chris Heimark <email@hidden>
  • Date: Sun, 11 Nov 2007 20:03:11 -0500

OK. Makes complete sense that Obj-C doesn't know because that particular class method returns an ID rather than a specific class instance pointer. The following solves the problem and satisfies the compiler:

NSUserDefaultsController *sudc = [NSUserDefaultsController sharedUserDefaultsController];
[sudc save:self];


That still doesn't tell me why Apple chose to have an ID returned rather than the standard convention. Is this just an aberration or is there a specific reason why in this case they chose to return an ID?

Chris

On Nov 11, 2007, at 5:16 PM, mmalc crawford wrote:


On Nov 11, 2007, at 2:04 PM, Chris Heimark wrote:

/Users/chris/Development/CHmessenger/CHmessenger.mm:627: warning: multiple methods named '-save:' found

<http://www.google.com/search?client=safari&rls=en-us&q=warning: +multiple+methods+named&ie=UTF-8&oe=UTF-8>

mmalc



_______________________________________________

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: 
 >compiler error related to 'save' method of NSUserDefaultsController (From: Chris Heimark <email@hidden>)
 >Re: compiler error related to 'save' method of NSUserDefaultsController (From: mmalc crawford <email@hidden>)

  • Prev by Date: SCNetworkInterfaceGetConfiguration always returns NULL.
  • Next by Date: Re: Crash Reporter for Cocoa Application
  • Previous by thread: Re: compiler error related to 'save' method of NSUserDefaultsController
  • Next by thread: Re: compiler error related to 'save' method of NSUserDefaultsController
  • Index(es):
    • Date
    • Thread