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 (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 arch...@mail-archive.com

Reply via email to