Re: NSUserdefaultsController warning
Re: NSUserdefaultsController warning
- Subject: Re: NSUserdefaultsController warning
- From: "Sean McBride" <email@hidden>
- Date: Mon, 23 Jul 2007 12:23:52 -0400
- Organization: Rogue Research
On 7/20/07 4:48 PM, ? said:
>> The methods have different signatures, so why do I get this warning?
>
>To overcome some rare compiler idiocy, +sharedUserDefaultsController
>returns a result of type (id), which means that the compiler cannot
>choose what -save: method you are actually calling. The solution is
>casting the return value of + sharedUserDefaultsController or the
>IMHO more readable:
I've always been curious about this... Things like NSAlert's -window
method returning 'id' instead of 'NSWindow*'. What is the 'rare
compiler idiocy' you refer to?
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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