Friday, March 27, 2009

Icons for Multiple Developer Tool Installs

If you have multiple copies of the Developer tools installed on your Mac (say, one for SDK 2.2.1, and one for 3.0), somebody on Twitter (maybe Craig Hockenberry?) suggested altering the icon of one of the two copies of Xcode so you can tell which is which in the Dock. I thought that was a brilliant idea.

Here is an icon file you can use if you want. Right-click and choose "Download Linked File" to save it.

This is what it looks like (nothing too fancy):


To change the icon, navigate to the Applications subdirectory of the beta /Developer folder, then right-click on Xcode.app and select Show Package Contents to open up the bundle. Once the new window comes up, drag the new appicon.icns to the folder inside the bundle called Resources, choosing to replace the existing file.

You may need to log out and back in to make the change take effect in your dock. You could also quit the Dock from the command line, or remove and re-add the beta Xcode icon.

NSConference

There's another great conference coming before WWDC. It's one I won't be able to attend, but it looks pretty awesome. If you're in the UK or even from continental Europe and can't afford the trip to WWDC, NSConference may be an acceptable alternative to tide you over till next year.

It's not an official Apple event like WWDC so you won't get the benefit of talking to the Apple engineers or seeing Steve Jobs speak (assuming he does at WWDC, that is), but they've got a heck of a lineup of speakers including the incomparable Mike Lee (now an Apple employee), Bill Dudney, Matt Gemmell, Andre Pang, Frasier Speirs, Philippe Mougin, Graham Lee, Marcus Zarra, and Drew McCormack.

I rather wish I could go, to be honest. Maybe next year.

Xcode Single Window Mode

Even though it's on the first pane you see in Xcode's preferences, a lot of people don't realize that Xcode has a couple of different modes it can work in, including an "All-in-One" mode (often referred to as "single-window mode"). The original Project Builder IDE (Xcode's predecessor) used the multiple window paradigm that's familiar to long time Mac and NeXT users. To a large extent, Xcode follows that basic model in its default mode. The debugger, breakpoints, console, and compile error feedback all comes to you by way of different windows.

Now, if you're on a machine with multiple monitors, this really still is the way to go. You can put your breakpoints and console on one monitor and run your program, or the iPhone Simulator on the other, for example, so you can always see your console and breakpoints. You can move the various windows around to best use your available screen real estate.

On the other hand, if you are on a laptop, or some other single-screen setup, especially one with a smaller screen, all those windows can be a little obnoxious. Xcode's single-window mode is ideal for these scenarios.

I've been using Xcode (and before that Project Builder) long enough that I was resistant to the change. But, I'm a laptop guy. I live on my laptop, and only rarely hook up a second display. This is a habit I developed from seven years of non-stop travel. I've gotten quite efficient using just the screen on my 17" MacBook Pro and find that I don't use extra screen real estate in the form of a second monitor effectively when it's available.

Recently, I realized I wasn't as efficient as I should be, though. All those extra windows in Xcode were hard to manage, and I was using exposé constantly because I usually work with Xcode's project windows maximized to take up the full screen. So, I decided to give the all-in-one mode a chance.

I had to revert back to the default mode yesterday to take some screenshots for my current project. In less than a week, I've become not just a fan of the all-in-one mode, I'm addicted to it. I hated turning it off. I hate that I can't use all-in-one mode for writing projects.

I made a few minor changes to make single-window mode work better for me. First, I re-mapped ⌘0 (command-zero, the default project view key binding) to ⌘1 (command one), and re-mapped ⇧⌘R (the debugger window key mapping, which takes you to the other project view in single-window mode) to ⌘2. Doing that, I can easily swap back and forth between the two views with one hand. I can't remember who this tip came from - someone on Twitter - but it's a lifesaver.

I've also tweaked the toolbar a little in single-window mode. Chances are I will be tweaking more as I get more accustomed to this layout, but this is my current layout:

If you work on a single-display, it's probably worth your time to give all-in-one mode a spin for a few days.