• 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
NSText textShouldBeginEditing behavior ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSText textShouldBeginEditing behavior ?


  • Subject: NSText textShouldBeginEditing behavior ?
  • From: Stéphane Sudre <email@hidden>
  • Date: Thu, 3 May 2001 16:01:01 +0200

According to the documentation,

NSText - (BOOL)textShouldBeginEditing:(NSText *)aTextObject delegate method should be called when the Control view wants to become first responder:

"Invoked from a text object's implementation of becomeFirstResponder, this method requests permission for aTextObject to begin editing. If the delegate returns YES, the text object proceeds to make changes. If the delegate returns NO, the text object abandons the editing operation. This method is invoked whenever aTextObject attempts to become first responder."

I'm not pretty sure to correctly understand what it means by attempting to become first responder.

I have a NSTableView with one column whose rows are text field (default type).

When I double-click on one of the rows in this NSTableView, the textfield is selected and is ready to accept keystroke which is correct but the textShouldBeginEditing is not called for the NSTableView delegate. This method is called as soon as I type on the keyboard.

I thought that since the textfield is selected, it is the first responder. It seems it's not the case.

So is there a delegate method to be warmed that the text field is ready to accept keystroke ?


  • Prev by Date: High speed shadows
  • Next by Date: Re: High speed shadows
  • Previous by thread: Re: Learning Cocoa
  • Next by thread: searching info, doc, examples for OS X cocoa app
  • Index(es):
    • Date
    • Thread