• 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: Ondra Cada <email@hidden>
  • Date: Sun, 31 Mar 2002 11:43:21 +0200

On Thursday, March 28, 2002, at 08:38 , Jonathan Feinberg wrote:

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.

That is not true -- see NSControl.html, "Notifications", near to end.

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.

This is a conveniency alternative: if you use delegation anyway, it would be inconvenient to add "yourself" as an observer too.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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.
References: 
 >Re: newbie notification question. (From: Jonathan Feinberg <email@hidden>)

  • Prev by Date: Distributed Object Help!
  • Next by Date: Re: How do I enable a menu item?
  • Previous by thread: Re: newbie notification question.
  • Next by thread: Re: newbie notification question.
  • Index(es):
    • Date
    • Thread