Using Greasemonkeys instead of Save Web page “RSS Proves to Solve Information Overload”
Mar 01

Building a Desktop Shell around a Web page for Apple Mac OS X with Cocoa

Apple, Google, Tech Add comments

gmailgcaldock

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:

  1. 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, and MyDocument.nib).

  2. Add the Web Kit frameworks to your project.

  3. Open MyDocument.nib using Interface Builder and drag a WebView from the Cocoa

7 Responses to “Building a Desktop Shell around a Web page for Apple Mac OS X with Cocoa”

  1. James Strachan Says:

    Awesome, I love it!

  2. Chris Says:

    Brilliant! Thanks.

  3. John Nunemaker Says:

    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.

  4. Ken Says:

    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.

  5. replicahandbags Says:

    thanks for info…

  6. replica handbags Says:

    thank you very much!

  7. Andrew Gilmartin Says:

    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.

Leave a Reply

Spam is a pain, I am sorry to have to do this to you, but can you answer the question below?

Q: Type in the word 'cricket'