Re: Double Clicks in an NSTextView.
Re: Double Clicks in an NSTextView.
- Subject: Re: Double Clicks in an NSTextView.
- From: Martin Wierschin <email@hidden>
- Date: Wed, 1 Apr 2009 16:47:40 -0700
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@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