Getting at NSTextFinder from text view
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