• 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: Intercept keydown in edited cell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Intercept keydown in edited cell


  • Subject: Re: Intercept keydown in edited cell
  • From: Jim Correia <email@hidden>
  • Date: Wed, 7 Mar 2007 11:20:12 -0500

On Mar 7, 2007, at 9:25 AM, Johan Augustsson wrote:

I little while ago I asked how to move around an NSTableView with
arrowkeys like a spreadsheet.
One tip was to use the NSResponder -moveup, movedown.

I can't figure out how to intercept a keyDown-message (To get the
arrowkey) while a cell is being edited. I guess that it doesn't help
to subclass NSCell, because NSCell don't have a keyDown-funcition.

How do I intercept arrowkey-press in an edited cell?

You first have to understand how AppKit uses the field editor.

<http://developer.apple.com/documentation/Cocoa/Conceptual/ TextEditing/Tasks/FieldEditor.html#//apple_ref/doc/uid/20001815>

Next it is important to understand that you ordinarily don't want to override -keyDown:, and doing so can interfere with text input.

<http://www.cocoabuilder.com/archive/message/cocoa/2006/2/15/156810>

It isn't clear to me what exactly you are trying to do here. It might be that a solution is to provide a custom field editor for your table view.

Jim
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >Intercept keydown in edited cell (From: Johan Augustsson <email@hidden>)

  • Prev by Date: Re: call scrollRangeToVisible in multi-threads cause application dead lock
  • Next by Date: Re: call scrollRangeToVisible in multi-threads cause application dead lock
  • Previous by thread: Intercept keydown in edited cell
  • Next by thread: Re: Intercept keydown in edited cell
  • Index(es):
    • Date
    • Thread