• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: newbie notification question.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: newbie notification question.
      • From: Ondra Cada <email@hidden>
References: 
 >newbie notification question. (From: Greg Jackson <email@hidden>)

  • Prev by Date: [ANN] DockDisks 1.0b1 released
  • Next by Date: idle waste
  • Previous by thread: Re: newbie notification question.
  • Next by thread: Re: newbie notification question.
  • Index(es):
    • Date
    • Thread