Get the text from a NSTextView?
Get the text from a NSTextView?
- Subject: Get the text from a NSTextView?
- From: Lorenzo Puleo <email@hidden>
- Date: Thu, 19 Dec 2002 17:24:42 +0100
I have put some text into an NSTextView using:
[myTextView readRTFDFromFile:myFile];
It works well.
Now I want to perform a seach into this text:
foundRange = [myTextView
rangeOfString:@"textToSearch"
options:NSLiteralSearch
range:NSMakeRange(0,[myTextView length])];
But it doesn't work. If instead of myTextView I put a NSString*, it works.
So, how to get the content of a NSTextView as NSString*?
Since the text could be very long I wouldn't get a duplicate of the text,
but I would get only a pointer to the text.
Thanks.
--
Lorenzo Puleo
mailto:email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.