Re: NSTextView - read line by line?
Re: NSTextView - read line by line?
- Subject: Re: NSTextView - read line by line?
- From: "John C. Randolph" <email@hidden>
- Date: Wed, 16 Apr 2003 14:24:01 -0700
On Wednesday, April 16, 2003, at 02:01 PM, Greg Titus wrote:
On Wednesday, April 16, 2003, at 01:38 PM, John C. Randolph wrote:
On Wednesday, April 16, 2003, at 01:15 PM, Steve Woodward wrote:
I've been RTFMing but have not discovered the right/best way to read
text that's in a TextView line by line. What I am looking to do is
get a list of items that the user types in and process that list one
item at a time. Is there another more appropriate control for this
purpose? Many thanks in advance!
NSString *thisLine, *allTheText = [myTextView string];
NSEnumerator *lines = [allTheText componentsSeparatedByString:@"\n"];
John meant to do this, not the previous line:
NSEnumerator *lines = [[allTheText componentsSeparatedByString:@"\n"]
objectEnumerator];
Whoops! (Mail is still a lousy development environment.)
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
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.