I was wondering whether anyone has managed to get NSTextFinder to work with NSTableView so that it will search through the table contents, highlighting the fields that match. The NSTextFinder documentation is difficult to understand and mixes its use searching with NSTextView in with the more general case so that it's difficult to follow. There seem to be precious few guides and no tutorials or examples around.
I'm specifically after how to set up the NSTextFinder's "client" (really a delegate) properties firstSelectedRange, selectedRanges and visibleSelectedRanges. Are they maintained by the NSTextFinder instance or are is the client expected to update them, and if so, to what? Do I need to implement rectsForCharacterRange: in the client? If so, how do I calculate the rects in NSTableView? I feel like I've done all the hard work implementing stringAtIndex:effectiveRange:endsWithSearchBoundary: but the "easy" stuff is holding me up. Also, is there any built in support for recognising when the tableview's content has been changed by the user and regenerating an index? At present I'm just scanning through the table rather than building an index at all. And geez it would be nice if there was a way for it to offer a regular expression option for power users. Thanks, Ben.
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com