Matching braces and [NSTextView selectionRangeForProposedRange:granularity:];
Matching braces and [NSTextView selectionRangeForProposedRange:granularity:];
- Subject: Matching braces and [NSTextView selectionRangeForProposedRange:granularity:];
- From: Iceberg-Dev <email@hidden>
- Date: Tue, 15 Sep 2009 00:01:09 +0200
I'm currently trying to match braces in a text editor and intend to
use selectionRangeForProposedRange:granularity: for that.
While I don't see any problem in finding the matching brace, I'm a
bit surprised by the way this method is called repeatedly.
So far, I don't see a good way to tell a double-click occurred and
just a double-click:
If you double-click and release the mouse button, this method is
invoked 2 times (from the double-click event).
If you double-click and do not release the mouse button, this method
is invoked 1 time but if you move the mouse cursor, it is invoked
again and the number of clickCount is still 2.
It might be possible to use some time measures to differentiate these
2 paths but this does not look like a good solution at all.
Any idea?
_______________________________________________
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