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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to