• 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: Enter Key Behavior in NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enter Key Behavior in NSTableView


  • Subject: Re: Enter Key Behavior in NSTableView
  • From: Chris Tracewell <email@hidden>
  • Date: Thu, 18 Jun 2009 18:01:35 -0700

raleigh,

I am not overriding textShouldEndEditing, but your suggestion did lead me to find that my File's Owner's superclass is implementing:

-(BOOL)control:(NSControl*)control textView:(NSTextView*)textView doCommandBySelector:(SEL)commandSelector

In there I had an if statement that was catching the insertNewLine: selector for every control in the view when I only intended it for some textFields.

Thanks for the help - it is working now.


Chris

On Jun 18, 2009, at 5:22 PM, Raleigh Ledet wrote:

I don't think this is normal. When a field editor is up, the Return should go to the Field Editor's keyDown: method, not TV. (for both cases)

Is your File's Owner overriding textShouldEndEditing:? and preventing the Field Editor from ending?

-raleigh

On Jun 17, 2009, at 4:03 PM, Chris Tracewell wrote:

I have a subclass of NSTableView which I have implemented keyDown to pick up delete and enter key presses. When the TV is bound to an array controller it works perfectly, I can detect keyDowns for the above mentioned and as a bonus when the user presses "Enter" or "Return" the field editor ends editing. Thats what I want.

The problem is that as soon as I hook up my File's Owner as the delegate for the TV the Field Editor no longer detects the Return and Enter key strokes. Is this normal? If so where do I look in docs to re-establish this behavior?
_______________________________________________


Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Enter Key Behavior in NSTableView (From: Chris Tracewell <email@hidden>)
 >Re: Enter Key Behavior in NSTableView (From: Raleigh Ledet <email@hidden>)

  • Prev by Date: Re: Enter Key Behavior in NSTableView
  • Next by Date: Incompatible managed object model versions
  • Previous by thread: Re: Enter Key Behavior in NSTableView
  • Next by thread: Add same object/key to NSMapTable
  • Index(es):
    • Date
    • Thread