Re: Help Please?
Re: Help Please?
- Subject: Re: Help Please?
- From: Scott Anguish <email@hidden>
- Date: Thu, 7 Mar 2002 01:15:41 -0500
sure, just take the HTML data that you have, and put it into an
NSTextView..
the NSTextStorage for an NSTextView is a subclass of
NSMutableAttributedString... so if you get the HTML into an
NSMutableAttributedString (using -initWithHTML:documentAttributes: or
- initWithHTML:baseURL:documentAttributes:) you can then just set the
value of the NSTextStorage (which you can get from NSTextView) to this
text using
[[theTextView textStorage] setAttributedString:[[[NSAttributedString
alloc] initWithHTML:myHTMLData documentAttributes:NULL] autorelease]];
you probably need to notify the textStorage or the NSTextView of the
changes - perhaps with NSTextView textDidChange..
On Wednesday, March 6, 2002, at 05:31 PM, Albert Atkinson wrote:
Hello!
I am making a program called BullFrog and one of the things I am
trying to do is this: I have a text field, button, and text field.
I have gotten it so that the user enters a web address, clicks the
button and the source appears in the text field. Here is what I
need help on:
I need the text field to render the source that is in it like a web
page, all I need is the basic formatting, images, styles and
clickable links. No fancy forms stuff or anything is needed.
Is this possible in Cocoa? Could someone give me a snippet of code
to help? I can not make head nor tails of the Apple Developer Docs.
Thanks you guys!
Albert
_______________________________________________
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.
References: | |
| >Help Please? (From: Albert Atkinson <email@hidden>) |