• 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: Leopard NSTableView Cell and single click editing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Leopard NSTableView Cell and single click editing


  • Subject: Re: Leopard NSTableView Cell and single click editing
  • From: Corbin Dunn <email@hidden>
  • Date: Thu, 29 Nov 2007 08:35:28 -0800



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
_______________________________________________

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: 
 >Leopard NSTableView Cell and single click editing (From: Manfred Schwind <email@hidden>)
 >Re: Leopard NSTableView Cell and single click editing (From: j o a r <email@hidden>)
 >Re: Leopard NSTableView Cell and single click editing (From: Stephane Sudre <email@hidden>)
 >Re: Leopard NSTableView Cell and single click editing (From: Corbin Dunn <email@hidden>)
 >Re: Leopard NSTableView Cell and single click editing (From: Manfred Schwind <email@hidden>)

  • Prev by Date: Re: NSPredicate and square brackets
  • Next by Date: Is there any compression library for Cocoa?
  • Previous by thread: Re: Leopard NSTableView Cell and single click editing
  • Next by thread: Re: Leopard NSTableView Cell and single click editing
  • Index(es):
    • Date
    • Thread