There're also 2 articles concerning "cocoa style" available on CocoaDevCentral: http://cocoadevcentral.com/articles/000082.php

On Apr 7, 2008, at 7:40 PM, Douglas Davidson wrote:

On Apr 7, 2008, at 10:28 AM, Hamish Allan wrote:

On Mon, Apr 7, 2008 at 6:05 PM, Michael Vannorsdel <[EMAIL PROTECTED] > wrote:

Change the function declarations/definitions to

- (NSString*)ChooseString:(int) IntVal (the * goes inside the parenthesis)

Additionally, it's good practice to start method names and variables
with lowercase letters; something like "ChooseString" or "IntVal"
looks like a class name to a seasoned Cocoa programmer.

- (NSString *)chooseString:(int)intVal

An excellent suggestion; and even better would be to give the method a name that describes what it takes and returns. A name like - chooseString: does not suggest a method that returns a value; for such a method we might pick a name like -stringAtIndex: or - chosenStringAtIndex: instead. This might seem like a trivial point, and perhaps it is, but a great deal of the consistency and predictability of the Cocoa interfaces comes from API conventions, of which naming patterns are no small part. Learn these patterns, and you will be better able to predict what methods a Cocoa class is likely to have, and remember what they do, just from their names.

Douglas Davidson

_______________________________________________

Cocoa-dev mailing list ([email protected])

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/john%40quobor.de

This email sent to [EMAIL PROTECTED]

_______________________________________________

Cocoa-dev mailing list ([email protected])

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