• 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
textDidEndEditing delegate?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

textDidEndEditing delegate?


  • Subject: textDidEndEditing delegate?
  • From: Richard Adams <email@hidden>
  • Date: Sat, 24 Nov 2001 13:28:28 -0800 (PST)

I need to do some processing after each key press in a
text edit field.

It seemed like the way to go was to use the
textDidEndEditing method sent to the delegate of an
NSTextField. I saw in the NSTextField.html docs that:


"An NSTextField can be assigned a delegate, who is
then informed of delegate messages sent by the
window's field editor, such as textShouldEndEditing:."

OK, I add

- (void)textDidChange:(NSNotification *)aNotification
{
NSBeep();
}

to my controller object and used IB to connect the
delegate field of the NSTextField to the controller
object.

But this method never is called.

The controller object is already acting as a delegate
of the application and the delegate method in that
case is working just fine, so it's not like I
completely don't get the delegate concept.

Also, I checked in the debugger and the NSTextObject's
delegate is set to my controller object.

Any suggestions on what I could be doing wrong?

P.S. What I'm trying to accomplish is to have two text
fields in my UI that are "coordinated". That is, when
one changes the other maintains a certain relationship
to the other. The textDidChange delegate method seemed
like the obvious place to accomplish this.

Richard
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1


  • Follow-Ups:
    • Re: textDidEndEditing delegate?
      • From: email@hidden (mikevannorsdel)
  • Prev by Date: Re: EO- classes in ObjC, (was Java Question - ...
  • Next by Date: old-style plists
  • Previous by thread: Re: EO- classes in ObjC, (was Java Question - ...
  • Next by thread: Re: textDidEndEditing delegate?
  • Index(es):
    • Date
    • Thread