NSAttributedString - initWithURL
NSAttributedString - initWithURL
- Subject: NSAttributedString - initWithURL
- From: Sebastian Frey <email@hidden>
- Date: Tue, 21 May 2002 18:27:53 -0700
Hey all -
OK, I'm a total newbie (talkin' 2-3 days), standard disclaimers apply.
So here I am, playing around, and I want to have a little app that
fetches a web page and renders the HTML, as best it can using the native
Cocoa stuff. From what I gather, I need to get a NSAttributedString and
use that in a NSTextView.
I am trying to load up the NSAttributedString using initWithURL:
documentAttributes: like so
attrString = [[NSAttributedString alloc] initWithURL:theURL
documentAttributes: (NSDictionary **) NULL];
The problem is that attrString always gets set to nil. No surprise,
because the docs say: "Returns self, or nil if the file at path can't
be decoded."
However, I don't know why the file at the path can't be decoded. I have
been able to get the data from the file at the URL easily enough like
this:
aString = [NSString stringWithContentsOfURL:theURL];
Using the very same URL.
Thanks in advance,
-Sebastian
_______________________________________________
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.