[FoRK] Leopard scripting

Kynan Shook <kshook at cae.wisc.edu> on Fri Jan 18 12:34:08 PST 2008

Jeff Bone writes:
>>>   * web browser
>
> Forthcoming, maybe... ;-)

OK, that's the easiest one on the whole list.  Since Apple added  
WebKit to the OS a few years ago, it has been possible to use their  
developer tools to easily build a browser in Objective-C/Cocoa.  Total  
lines of code you have to write? Zero.

(There is some code (eg a #import and an NSApplicationMain(argc, argv)  
call) in just the basic project template, giving you the basics of a  
double-clickable application.  You can actually do the entire thing in  
Interface Builder, but that produces an Interface Builder document,  
which you'd have to open and then do "Simulate Interface" instead of  
having a standalone app.)

It's a pretty nifty demo to see; back in the old days, the cool NeXT  
demos (from what I hear, anyway) were things like the no-code text  
editor...  Now, just a couple clicks in Xcode and (mostly) Interface  
Builder gives you a working web browser; nothing too fancy beyond a  
URL bar, back, forward, reload, and stop buttons, printing, and text  
resizing.  But what more do you really need in a web browser?  I think  
you could add things like tabbed browsing, bookmarks, and other basic  
features in a few lines of code.  It might not be pretty, but it's  
very easy.

More information about the FoRK mailing list