On 27 May '08, at 12:06 PM, Ari Black wrote:

NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
[center addObserver:self selector:@selector(Quit:) name:NSApplicationWillTerminateNotification object:NSApp];

I have defined Quit: on my main object, so I pass self as the first argument.

This is, functionally, correct.

However, the method should be named "quit:", not "Quit:". Objective-C coding style almost always uses lower-case method names. The only exceptions I've seen are ones where the initial word of the name is an acronym that looks awkward when lowercased, e.g. accessors named "URL" or "MIMEType".

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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