Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: WebView and single-window, document-based application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WebView and single-window, document-based application



Hi Leonardo,

I don't think there's a good way to transfer the contents of one WebView to another. Safari uses one WebView per tab; that's probably the simplest approach to take.

John

On Feb 18, 2008, at 11:32 AM, Leonardo Cassarani wrote:

Hello everyone

I'm rather new to Cocoa and I'm trying to code a single-window browser using WebKit and the NSDocument system. I gather I must subclass NSWindowController and override (among others) the setDocument: method, to "save" the status of the WebView to the current document, then set the WebView to display the status of the newly-opened document's own WebView.

However, WebView's class reference documentation doesn't say how to do this, i.e. "copy" one WebView onto another (if I understand correctly) so that they both display the same chunk of the same (cached, I suppose) webpage, with the same data etc.

I assumed (perhaps wrongly) that Safari worked this way as far as the tabs system is concerned. If not, I'd really appreciate it if you could point me in the right direction, or just pop in with any kind of advice.

Thanks a lot
Leonardo Cassarani
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webkitsdk-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >WebView and single-window, document-based application (From: Leonardo Cassarani <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.