Re: newbie notification question.
Re: newbie notification question.
- Subject: Re: newbie notification question.
- From: Jonathan Feinberg <email@hidden>
- Date: Thu, 28 Mar 2002 14:38:57 -0500
I spent a couple of hours trying to setup an object class to catch a
notifcation from an NSTextField.
The messages sent by text fields are not Notifications, but
Objective-C messages sent to Objective-C object instances. You must
set the delegate outlet of the given text field to an instance of one
of your classes. For example, you might make the controller for your
window the delegate for the text field. Then, the text field will
invoke the methods -textDidChange: and its kin on your delegate.
You may either connect the text field's delegate outlet to your
controller class in Interface Builder, or you may do it
programmatically:
- (void) awakeFromNib
{
[textField setDelegate:self];
}
--
Jonathan Feinberg email@hidden Inwood, NY, NY
http://MrFeinberg.com/
_______________________________________________
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.