Re: notifications questions
Re: notifications questions
- Subject: Re: notifications questions
- From: Shawn Erickson <email@hidden>
- Date: Sun, 21 Sep 2003 11:59:33 -0700
On Sunday, September 21, 2003, at 11:27 AM, Theodore Petrosky wrote:
I am looking for a deeper understanding of syntax for
notifications.
[[NSNotificationCenter defaultCenter] addObserver:
self selector: @selector(cellTextDidEndEditing:) name:
NSControlTextDidEndEditingNotification object:
njProjectCodeComboBox];
My question is about the @selector. does is have to be
cellTextDidEndEditing:? Can I create a selector
mySelector: for this object?
You can use any name for you selector that you want. The observer you
add obviously has to have a method by that name for things to work.
Try reading the online docs (all found in a few click from Apple
website)...
http://developer.apple.com/documentation/Cocoa/Conceptual/
CommunicateWithObjects/Articles/Notifications.html#//apple_ref/doc/uid/
20001925
and
http://developer.apple.com/documentation/Cocoa/Conceptual/
Notifications/index.html#//apple_ref/doc/uid/10000043i
and
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/
ObjC_classic/Classes/NSNotification.html#//apple_ref/occ/cl/
NSNotification
-Shawn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.