Write a web browser using zero lines of code
Here's a fun way to impress your friends (if your friends are impressed by this sort of thing): write a web browser using zero lines of code. To accomplish this feat, you'll need Web Kit installed on your Mac. Web Kit is the framework that is the basis of Safari. Once that's done, follow these steps:
- Install Project Builder, December 2002, if not already installed
- Install Safari, if not already installed
- Make a new Cocoa Application project in Project Builder
- Add the Web Kit Framework to the project
- Open up the MainMenu.nib file in Interface Builder
- Drab the Webview header file to Interface Builder
- Add a Customview to the main window
- Change its type to Webview
- Add a text box to the main window
- Connect the target output of the text box to takeStringURLFrom in the Webview
- Build the project
- Type a URL in the text box and hit Enter
- Open Mountain Dew. Commence smug grinning.
You can find the specifics here. Now, don't expect the result to be a web browser that is feature-rich, compliant or impressive in any way. But, it will load pages and nudge your geek cred up a notch.
[Via MacNN]