• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Matching braces and [NSTextView selectionRangeForProposedRange:granularity:];
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Custom Fonts in UI Webview
  • Next by Date: Re: Custom Fonts in UI Webview
  • Previous by thread: Re: Custom Fonts in UI Webview
  • Next by thread: NSPathControl not displaying icons initially
  • Index(es):
    • Date
    • Thread