I would like to be able to intercept double clicks on the text in an NSTextView even if the text is not a link and is not in an NSTextAttachmentCell. I did try to do this by implementing the textView: willChangeSelectionFromCharacterRange: toCharacterRange and comparing the initial and the proposed ranges and the time between the current call to this method and the previous one.

Can't you simply check if a double-click is in progress during the "willChange" method? Eg: [[[textView window] currentEvent] clickCount].

If not, subclass NSTextView and override mouseDown and you can check the click count of the NSEvent parameter directly.

~Martin

_______________________________________________

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