Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Opening links in new windows in Carbon?



> You're on the right track. You'll need to do whatever it takes in  
> your application to allocate a new window with a web view in 
> it. That can be Qt code or whatever. Then you have to dig down inside 
> that new window and get the HIWebView and get the WebView from that.
Then  
> you'd return that WebView to the delegate method.

After we thought about it more, we decided we didn't want to have
our embedded browser open another custom window when "Open Link in
New Window" was selected, but instead wanted it to launch the default
browser.  So I implemented the createWebViewWithRequest as
(error-checking
omitted):

- (WebView *)webView:(WebView *)sender
createWebViewWithRequest:(NSURLRequest *)request
{
    LSOpenCFURL((CFURLRef) [request URL], NULL);
    return nil;
}

Is this a reasonable way to do it?  It does appear to work.

== Rich Carreiro
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:
http://lists.apple.com/mailman/options/webkitsdk-dev/email@hidden

This email sent to email@hidden



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.