On 17 Oct 2009, at 05:18, Jens Alfke wrote:


On Oct 16, 2009, at 3:42 PM, Ian Piper wrote:

The Text View is simply used as a place for the user to put any rich text and or images. Is there a way either to search or to get all of the plain text out from such a Text View? It's probably a simplistic question and I rather suspect that ultimately the answer is no!

NSTextView (and its parent class NSText) have methods for doing find and replace, which is what the commands in the Find submenu are wired up to. They even select the target text, scroll to it and blink it for you.

That would suit me well if I could just understand how to tap into it. I can set up filterPredicates in IB for other attributes in my data model but not for the one that is displaying its content in the NSTextView.


If that's too high level, just get the string property of the NSTextStorage and use NSString methods for searching for substrings.

—Jens

I'd be equally happy to do this if I could see how to (see my other posting this morning)!


Ian.
--_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to