FROM : Corbin Dunn
DATE : Thu Nov 29 17:35:28 2007
>
>
>> Mani, in regard to your original problem -- how did you limit an
>> editing session on Tiger?
>
> If I remember correct, I overwrote the trackMouse:... routine of the
> cell. If the user clicks on the special area of my NSTextFieldCell
> subclass, I am doing something else. But the single click editing
> seems to happen at another level (most probably in the NSTableView
> mouseDown code, I think).
>
> But I was able to solve my problem. I found a way to disable the
> single click editing on Leopard, so the app behaves exactly like on
> Tiger. (I did not find a solution to get the desired behaviour plus
> single click editing on Leopard. But that's not so critical in my
> case and I spent no more time into that.)
>
>> Side note: there is a way to disable the single-click editing
>> behavior
>
> There is: I just always return NO in the tableview delegate method
> tableView:shouldEditTableColumn:row:.
> I still can start an editing session programmatically
> (editColumn:...), if I want to. In my case editing is only available
> through a contextual menu. Double clicking is overwritten with
> another action that makes more sense in my app (but I think it must
> be possible to start an editing session here if I would have wanted
> that, too).
Yes -- that will work, it just removes the ability for the editing to
automatically happen without a right click.
What you are referring to is one of the primary reasons why single-
click to edit is so beneficial for apps and users. You have some
particular text in a cell that you want to be editable, yet at the
same time you also want a doubleAction to do something else.
Previously, on Tiger, there was no way to differentiate them; a double
click would *always* begin editing (unless you did some additional
work). Now, with "hitTestForEvent:", you can have finer grained
control, and still all double clicking on text to perform the
doubleAction, while single-clicking on text will begin editing. IMHO,
this is an ideal solution. Take Xcode for example; the project list
supports a doubleAction (ie: open that file in a new window). Before
Leopard, the only way to inline-edit was with a strange (and not
easily discoverable) alt-click to begin editing the cell. On Leopard,
it is much easier; you just single-click on the text (ala Finder) to
begin editing.
--corbin
DATE : Thu Nov 29 17:35:28 2007
>
>
>> Mani, in regard to your original problem -- how did you limit an
>> editing session on Tiger?
>
> If I remember correct, I overwrote the trackMouse:... routine of the
> cell. If the user clicks on the special area of my NSTextFieldCell
> subclass, I am doing something else. But the single click editing
> seems to happen at another level (most probably in the NSTableView
> mouseDown code, I think).
>
> But I was able to solve my problem. I found a way to disable the
> single click editing on Leopard, so the app behaves exactly like on
> Tiger. (I did not find a solution to get the desired behaviour plus
> single click editing on Leopard. But that's not so critical in my
> case and I spent no more time into that.)
>
>> Side note: there is a way to disable the single-click editing
>> behavior
>
> There is: I just always return NO in the tableview delegate method
> tableView:shouldEditTableColumn:row:.
> I still can start an editing session programmatically
> (editColumn:...), if I want to. In my case editing is only available
> through a contextual menu. Double clicking is overwritten with
> another action that makes more sense in my app (but I think it must
> be possible to start an editing session here if I would have wanted
> that, too).
Yes -- that will work, it just removes the ability for the editing to
automatically happen without a right click.
What you are referring to is one of the primary reasons why single-
click to edit is so beneficial for apps and users. You have some
particular text in a cell that you want to be editable, yet at the
same time you also want a doubleAction to do something else.
Previously, on Tiger, there was no way to differentiate them; a double
click would *always* begin editing (unless you did some additional
work). Now, with "hitTestForEvent:", you can have finer grained
control, and still all double clicking on text to perform the
doubleAction, while single-clicking on text will begin editing. IMHO,
this is an ideal solution. Take Xcode for example; the project list
supports a doubleAction (ie: open that file in a new window). Before
Leopard, the only way to inline-edit was with a strange (and not
easily discoverable) alt-click to begin editing the cell. On Leopard,
it is much easier; you just single-click on the text (ala Finder) to
begin editing.
--corbin
| Related mails | Author | Date |
|---|---|---|
| Manfred Schwind | Nov 26, 16:00 | |
| j o a r | Nov 26, 16:47 | |
| Stephane Sudre | Nov 26, 18:13 | |
| Corbin Dunn | Nov 28, 01:52 | |
| Manfred Schwind | Nov 29, 12:37 | |
| Corbin Dunn | Nov 29, 17:35 | |
| Wdyp | Nov 29, 23:41 | |
| Corbin Dunn | Nov 30, 02:07 | |
| Mike Wright | Dec 1, 12:47 | |
| Corbin Dunn | Dec 3, 21:55 | |
| john chen | Mar 20, 22:32 | |
| john chen | Mar 21, 17:47 |






Cocoa mail archive

