Re: NSTableView problem...
Re: NSTableView problem...
- Subject: Re: NSTableView problem...
- From: Ondra Cada <email@hidden>
- Date: Fri, 9 Aug 2002 15:33:02 +0200
On Friday, August 9, 2002, at 02:44 , Peter Hudson wrote:
I'm using an NSTableView in an app that I'm writing. Once the user has
double clicked a cell to make it editable, how can I trap the arrow keys
and handle them as I wish ?
Since I dunno what you wish, I don't have a precise answer, but generally.
.. it's not straighforward (although not really difficult). The thing is
that as soon as the cell is edited, it is in fact no more the cell, but an
NSTextView specialized for this kind of tasks (see "field editor" of a
window for details).
You should be able to exploit textview delegate methods and/or input
management methods to achieve almost anything you want to.
Do though please consider how far do you want to differ from the standard
editing behaviour, so as your GUI does not become unintelligible. For
example, unless you disable it yourself, it *is* possible to enter
multi-line string values into fields (using paste or Alt-Enter), and that'
s when up/down arrows become really useable! Also, nothing can be as
inconvenient as if you press left arrow one more time when wanting to go
to a field beginning, and whoops! you skip to a previous cell...
---
Ondra Hada
OCSoftware: email@hidden
http://www.ocs.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.