ChumbiTunes

June 4th, 2009

John Forsythe wrote to let me know that he’s released ChumbiTunes, a very cool widget for Chumby owners that lets you view now playing information and control playback from the device. John has built a free iTunes control server for Windows users, but also made it compatible with Signal in the Advanced mode so any Signal user can use a Chumby to control iTunes on their Mac or iTunes, Winamp, or Windows Media Player on their PC.

To enable ChumbiTunes to talk to Signal an XML file needs to be installed alongside Signal, instructions are available on the Google Group. This file will be bundled with the next Signal release so the setup step will not be required in the future.

It’s great to see users extending the application this way, if you have a project you’d like to integrate Signal with just let me know and I’ll be happy to help.

Browsing Mac/iPhone Topics on Stack Overflow

April 4th, 2009

Stack Overflow has turned into a great resource for developers, the social aspect it brings to helping other users out has brought a lot of very smart people to the site. Often times when a Google search lands me there I’ll end up browsing around a bit because I usually learn something in the process.

Since it’s not exactly obvious how to narrow down the focus to particular development topic, I wanted to share a bookmark I use to browse recent Mac and iPhone development questions:

Stack Overflow: Mac/iPhone

This works by browsing a combination of tags and has turned out to be a great addition to my list of time killers.

Documentation Online

March 25th, 2009

Up to now Signal’s documentation has been available through the help files bundled with the application, accessible via Help > Signal Help on a Mac or Start > Programs > Signal > Signal Server Help on a PC. Starting today that documentation is also available here on the web site for users who would like to view it in advance or find it more convenient to view in their web browser.

I’ve set up a system to keep the two in sync (they’re actually generated from the same source files) so as tips and troubleshooting suggestions are added they’ll be available both here and within the application’s bundled help file.

Signal 1.1.5

March 15th, 2009

A quick fix for Windows users, Signal 1.1.5 resolves a media library compatibility issue with Winamp 5.55 and later.

Sizing a Preference Pane Dynamically

March 10th, 2009

If you’ve tried to develop a system preference pane on the Mac that works across both Tiger and Leopard you may have run into a small but annoying problem: although the System Preferences window is resized to the height of your view it has a fixed width and does not resize your view to fit within that width. This renders any autoresizing rules applied to your view useless, so you end up with a preference pane that is either clipped on 10.4 and earlier or too small on 10.5 and later.

The Apple examples for handling this situation recommend creating two separate views sets: one set for 10.4 and earlier and another set for 10.5 and later. Unless your layout is significantly altered between the two OS versions this has some drawbacks. You now have two sets of views to build and maintain, and if a future version of OS X alters the System Preferences window size again you’re going to need yet another set.

Luckily there is a simple solution. Although System Preferences does not resize the width of our view for us we can do this ourselves quite easily by matching the content width of the System Preferences window.


- (void)mainViewDidLoad {
    NSRect rect = [[self mainView] frame];
    NSWindow *systemPrefsWindow = [[NSApplication sharedApplication] mainWindow];
    rect.size.width = [systemPrefsWindow contentRectForFrameRect:[systemPrefsWindow frame]].size.width;
    [[self mainView] setFrame:rect];
}

We could simplify this code a bit by using the superview’s frame or the contentView of systemPrefsWindow, but contentRectForFrameRect: is used for a couple of reasons. We need to resize the view before it is first displayed, but the superview will not have valid size information until didSelect, at which point our view is already on the screen. In addition, by obtaining the content rect from the window rather than the frame of the contentView we are making no assumptions about the size of whatever contentView currently represents.

This simple change sizes our main view to the width of the System Preferences window, our autoresizing rules are now applied, and viola: a single set of views that scales to a System Preferences window of any width.