Re: NSTableView not letting me double-click rows always?
Re: NSTableView not letting me double-click rows always?
- Subject: Re: NSTableView not letting me double-click rows always?
- From: Corbin Dunn <email@hidden>
- Date: Mon, 22 Aug 2005 16:03:40 -0700
You need to implement:
- (BOOL)tableView:(NSTableView *)tableView shouldEditTableColumn:
(NSTableColumn *)tableColumn row:(int)row;
You may also want to reconsider your UI; having some files editable
and others do a different action on double click is strange. how
about -- always do an action on double click, but on a single click
of an already selected row, put that row into edit mode (if it is
editable).
-corbin
On Aug 20, 2005, at 8:43 AM, Theodore H. Smith wrote:
I have a strange situation here.
I want to make some rows in an NSTableView have editable text, but
others should have a double-clickable action that opens the file in
the Finder.
One of the things this app does, is give a kind of "file
organisation" app, which lets you organise some files. So some of
the items in the NSTableView won't be real files or real folders,
but will be virtual ones that the user added to organise stuff.
So, when these "virtual folders" are double clicked, I want the
file name to be edited.
However, when a real file is clicked, I want the file to be opened
with it's app.
How do I do this?
I've tried, and I run up against a problem.
When I make the column's [editable] state to be true, I don't get
doubleClick events sent! However, the rows text do get edited, as
expected, as long as the row is editable.
If I set the column's [editable] state to false, I do get
doubleClick events! However, then I can't edit the text by double-
clicking it.
Is there some kind of work around here?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden