You're correct - there is no first argument per se: it is part of the method selector, together they are called a "keyword."

http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/chapter_3_section_3.html

A message with a single argument affixes a colon to the selector name and puts the argument right after the colon. This construct is called a keyword ; a keyword ends with a colon, and an argument follows the colon. Thus we could diagram a message expression with a single argument (and assignment) as the following:

****If a message has multiple arguments, the selector has multiple keywords. A selector name includes all keywords****, including colons, but does not include anything else, such as return type or parameter types. A message expression with multiple keywords (plus assignment) could be diagrammed as follows:




Well now I'm a bit confused as I just used the same paragraph to show
that it does. Too much C++ thinking I guess. I'm thinking the method
name is setWidth with two arguments, one unlabeled and the other
labeled with 'height'. Any suggestions where I should brush up on this
- apart from the manual I'm looking at already?

thanks!

Peter

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to