Re: Extract plain text content from a Text View
Re: Extract plain text content from a Text View
- Subject: Re: Extract plain text content from a Text View
- From: Ian Piper <email@hidden>
- Date: Sat, 17 Oct 2009 07:21:56 +0100
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 (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