Re: Creating / Printing WebViews programmatically
Re: Creating / Printing WebViews programmatically
- Subject: Re: Creating / Printing WebViews programmatically
- From: George Orthwein <email@hidden>
- Date: Thu, 14 Sep 2006 13:45:16 -0400
On Sep 14, 2006, at 7:51 AM, Rob Chahin wrote:
The setHostWindow: is in there because the Apple docs mention
attaching a WebView to a window, but don't go into detail about
when you need to do it. The result is the same regardless.
From looking at list archives (don't forget webkitsdk-dev), it looks
like adding the webview to an offscreen window is something people
have done successfully for printing.
The problem seems to be that I'm creating my webView incorrectly,
since it more or less works with the IB webView. I tried printView
= [WebView new]; but that didn't work either.
I create a webview in much the same way and then add it to a tabview
which works fine. (MyWebView is a subclass):
MyWebView* newWebView = [[MyWebView alloc] initWithFrame:[theTabView
contentRect] frameName:nil groupName:nil];
[newTabItem setView:newWebView];
So perhaps it is just the attaching it to a window bit.
Hope that helps,
George
_______________________________________________
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