• 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: How to implement to rename the file by single click its name column
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to implement to rename the file by single click its name column


  • Subject: Re: How to implement to rename the file by single click its name column
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 14 Sep 2009 20:57:24 -0700


On Sep 14, 2009, at 8:12 PM, James wrote:

I can implement to play the file by double click its name column only. But I do not know
how to implement to rename the file by single click its name column.

Unfortunately this isn't one of the things NSTableView makes easy for you. If I recall correctly, the steps to doing this are:


1. Subclass NSTableView and override mouseDown: to start a timer for some interval like 0.5sec if the user clicked on an editable name column. (Don't forget to call super too.)
2. When the timer goes off, check that the user hasn't clicked elsewhere in the view, and the view is still first responder.
3. If so, make the clicked column in the selected row editable.


—Jens_______________________________________________

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: 
 >How to implement to rename the file by single click its name column (From: James <email@hidden>)

  • Prev by Date: Re: Need -[NSTask waitUntilExitOrTimeout:] (was NSTask "Thread Unsafe"...)
  • Next by Date: NSOperation and lazy loading
  • Previous by thread: How to implement to rename the file by single click its name column
  • Next by thread: NSOperation and lazy loading
  • Index(es):
    • Date
    • Thread