Re: ASCII Issues; Subclassing NSBrowser
Re: ASCII Issues; Subclassing NSBrowser
- Subject: Re: ASCII Issues; Subclassing NSBrowser
- From: Mark T <email@hidden>
- Date: Mon, 11 Feb 2002 01:27:07 -0500
>
I have an NSDocument based app that reads in text files with
>
-loadDataRepresentation: ofType: and immediately stores them in a string
>
using [[NSString alloc] initWithData: encoding:]. I was a little unsure
>
about what to use for the second argument, so I used NSASCIIStringEncoding.
>
>
Anyway, the file's contents are strings separated by ]'s(I'm not sure how
>
well that's gonna be transmitted by email, so, it's a dagger, or option-t,
>
or, according to NSLog, \U00a0). And that's really my problem. [theString
>
componentsSeparatedByString:@"]"] returns an array with only one element(it
>
should have about 4000). I can't find any way to make the ] that I type in
>
my code match the ] in the text file.
There's nothing like solving a problem 2 minutes after asking for help. I
needed to use NSMacOSRomanStringEncoding for this to work right. Damn Apple
and their "Description Forthcoming" messages, which caused me to shy away
from using it.
So, with that issue solved, I have a new question. I have an NSBrowser view
working perfectly in my app, except that the data it presents looks very
silly due to all of its columns being forced to be the same width. If I
could programatically force the columns to be fixed ratios of the overall
Browser width, I'd be happy. Optimally, though, I'd like to create an
NSBrowser subclass which grouped its columns(NSScrollViews surrounding
NSMatrixes) in NSSplitViews. Would this sort of behavior be possible by
subclassing, or would I have to start from scratch?
Help is much appreciated, as always,
Mark T.
_______________________________________________
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.