Newbie WebKit Q: Problems when loading an HTML string?
Newbie WebKit Q: Problems when loading an HTML string?
- Subject: Newbie WebKit Q: Problems when loading an HTML string?
- From: Ken Tabb <email@hidden>
- Date: Fri, 28 Oct 2005 14:15:42 +0100
Hi folks,
I have an app that takes a string (of HTML text) and renders it in a
WebView, using:
IBOutlet id webView; //hooked up in IB
...
[[webView mainFrame] loadHTMLString:myHTMLString
baseURL:someSensibleURL];
... and as you'd expect it works like a charm, shows the rendered
HTML on screen etc.
I then need to get at that same mainFrame's -dataSource, yet it
returns nil. The page is rendered, it's fully loaded etc. but
seemingly has no dataSource. Equally if I try to get its underlying
HTML using
NSString *myString = (DOMHTMLElement *)[[[webView mainFrame]
DOMDocument] documentElement] outerHTML];
... then that too returns nil.
Is this because I'm specifically loading a string, rather than a file/
URL? And if so, is there any way I can get at the mainFrame's
dataSource? Please don't make me go back to writing temp files :(
Thanks in advance for any clues,
Ken
- - - - - - - - - -
Dr. Ken Tabb
Mac & UNIX Developer - Health & Human Sciences
Machine Vision & Neural Network researcher - School of Computer Science
University of Hertfordshire, UK
http://www.health.herts.ac.uk/ken/
Certified non-Microsoft Solution Provider
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden