Re: Dynamic modification of text search results
Re: Dynamic modification of text search results
- Subject: Re: Dynamic modification of text search results
- From: Martin Wierschin <email@hidden>
- Date: Thu, 05 Jul 2012 12:21:38 -0700
> Regarding the other solution--just do another search when the text changes--you only have to search the range that was changed, not the entire text storage, right? That doesn't seem like it would be too ungainly.
Not too ungainly, no. But then you're maintaining the matches in an external data structure, so you'd also have to adjust the ranges of all the other matches (eg: shift the starting location of all matches that come after an insertion). Not that difficult, but it could be computationally expensive for high frequency changes (eg: regular user typing) depending on how many matches you have.
~Martin
_______________________________________________
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