![]()
As we use web applications more and more on core tasks (email, calendar, office) I have found that I sometimes get frustrated when some annoying piece of Flash on a random web page brings down my entire browser process (including the web applications that I care about).
Some browsers allow you to run multiple instances in their own world. For others you could hack around that by having multiple copies of the browser. I have gone through phases of compartmentalizing my work on various browsers.
- Development work on a Firefox instance because I want to use Firebug
- Fluffy browsing on WebKit nightly (to try to be a tester too)
- Apps in Safari
My main problem with this is that I normally also want Firefox for certain apps because I make heavy use of Greasemonkey. I couldn’t do Gmail without at this point (let alone the other sites).
I am used to having my calendar on window 2 of VirtueDesktop (iCal). I am not experimenting with Google Calendar, and I want to do the same. Instead of just having an instance running Google Calendar over there, I decided to try to built a wrapper around a browser component.
I am trying this in both Mac OS X Cocoa, and Adobe Apollo.
Today we will discuss the OS X version.
In theory the hard work is definitely already done for us. The WebKit component is nicely done for us, and the documentation is thorough.
I decided to try to follow the “Multiple Windows” example:
You can implement multiple windows in a Web Kit application easily by beginning with a Cocoa document-based architecture as follows:
Using Xcode, create a document-based Cocoa application. Your new project file will already contain the needed classes and interface files to support multiple windows (namely
MyDocument.h,MyDocument.m, andMyDocument.nib).Add the Web Kit frameworks to your project.
Open
MyDocument.nibusing Interface Builder and drag a WebView from the Cocoa

March 1st, 2007 at 1:56 pm
Awesome, I love it!
March 1st, 2007 at 8:05 pm
Brilliant! Thanks.
March 1st, 2007 at 9:10 pm
Sweet. More please. I’d like to see how to add features that work only with specific apps such as bounce the dock with a new email and show the count. Thanks for the write up.
March 1st, 2007 at 9:13 pm
Great, but…
“I make heavy use of Greasemonkey. I couldn’t do Gmail without at this point”
I agree! The question is how to have a cocoa app wrap gmail and allow for the awesome speed of the gmail greasemonkey scripts.
May 19th, 2008 at 12:30 am
thanks for info…
June 25th, 2008 at 12:26 am
thank you very much!
January 6th, 2009 at 11:28 am
Hum. Looks like this posting has been truncated. What happens after “3. Open MyDocument.nib using Interface Builder and drag a WebView from the Cocoa”? Thanks.