Re: Newbie question
Re: Newbie question
- Subject: Re: Newbie question
- From: Mark Woollard <email@hidden>
- Date: Wed, 11 Sep 2002 18:37:24 +0100
Loading it isn't too big a deal - biggest case is around 300k. I'm just
concerned about moving the data around between the NSString and the
NSTextView. I guess you can blame it on my starting out hand coding Z80
assembler in the 80's:-)
Mark
On Wednesday, September 11, 2002, at 04:43 pm, Matt Neuburg wrote:
On Wed, 11 Sep 2002 14:00:32 +0100, Mark Woollard <email@hidden>
said:
I have a NSTextView object which I want to load with the ASCII text
from a disk file. What's the recommended way to do this? Is it a case
of loading text into an NSString then setting the text
What you see in an NSTextView *is* an NSString so there's no way to
avoid
stringification of your text. If the problem is that the text is huge
and
you don't want to load it in all at once, NSData lets you read the file
"mapped", meaning basically that whatever you don't need stays on
disk. m.
--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/
_______________________________________________
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.
_______________________________________________
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.