• 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
Getting at NSTextFinder from text view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting at NSTextFinder from text view


  • Subject: Getting at NSTextFinder from text view
  • From: Shane Stanley <email@hidden>
  • Date: Mon, 13 Apr 2015 12:00:40 +1000

My document window includes several text views, all with find bars and incremental searching enabled, and searching works as expected. However, if I change the contents of a view via its text storage, and the user is in the middle of a search (that is, the gray overlay is showing with finds highlighted), I get either a crash (out-of-range error) or nonsense highlighted (the same ranges highlighted even though the content differs).

It looks to me like I need to call either -cancelFindIndicator or -noteClientStringWillChange on the text finder before I change the text. But I can't see how I can actually get hold of the frameworks-provided text finder to message it.

I fear I'm missing something simple. Any clues?

--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>


_______________________________________________

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


  • Follow-Ups:
    • Re: Getting at NSTextFinder from text view
      • From: Martin Hewitson <email@hidden>
  • Prev by Date: Re: NSURLProtocol
  • Next by Date: Re: Getting at NSTextFinder from text view
  • Previous by thread: Re: Scattered NSProgress use
  • Next by thread: Re: Getting at NSTextFinder from text view
  • Index(es):
    • Date
    • Thread