Re: Default keyword selector type
Re: Default keyword selector type
- Subject: Re: Default keyword selector type
- From: Ken Thomases <email@hidden>
- Date: Sat, 13 Nov 2010 06:41:18 -0600
On Nov 10, 2010, at 9:17 PM, Michael Hall wrote:
> In looking at NSControl.h there is a NSKeyboardUI category definition with the following instance method declaration
>
> - -- (void)performClick:sender;
>
> This category is defined a number of places and at least some of them indicate that the type for sender should be (id)sender.
> How is it NSControl does nothing to indicate the type?
> Is id a default or is it somehow inherited in this situation?
From <http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocLanguageSummary.html#//apple_ref/doc/uid/TP30001163-CH3-TPXREF106>:
> • The default return and argument type for methods is id, not int as it is for functions. (However, the modifier unsigned when used without a following type always means unsigned int.)
Cheers,
Ken
_______________________________________________
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