Le Nov 15, 2008 à 5:54 AM, Jerry Krinock a écrit :


On 2008 Nov, 15, at 2:54, Nick Rogers wrote:

when double clicking on an item the action method is not being called in 10.4.11.
Its working fine on Leopard.

The behavior was indeed changed in Leopard:

http://developer.apple.com/releasenotes/Cocoa/AppKit.html

"NSTableView/NSOutlineView - Single click to editNSTableView and NSOutlineView now behave like Finder and allow a single click to put it into edit mode. This is done by calling - hitTestForEvent:inRect:ofView: and checking if the cell returns NSCellHitEditableTextArea. This allows you to set a doubleAction and perform some different task when the doubleAction is invoked (for instance, Finder opens files on a double click, and edits via a single click). If the doubleAction is not set, editing is still allowed via a double click."

The converse of this statement would be that, in 10.4.11, doubleclicking will always edit.

Personally, I believe this should be explained in the current documentation, but I've seen other cases in which Apple documents version-specific behavior changes in Release Notes only. I don't know if that is intentional Apple policy or a bug.


Please do log a bug requesting that we clarify this in the documentation.

Nick -- the -doubleAction will work -- you just have to make sure the cell isn't editable. If you do want to allow the text in it to be edited, then you may be out of luck, since double click means "start editing". There are ways around it, but it involves a bit of subclassing and processing things differently depending on where the user double clicks.

corbin

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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