Alert panels: Read the HIG, not the headers. February 13
Okay, here’s a quick one for the Cocoa folks in the audience. We’ve got this nice convenient function (and several others based on it) for throwing up an alert panel:
NSRunAlertPanel(NSString *title, NSString *msg, NSString *defaultButton, NSString *alternateButton, NSString *otherButton, ...);
Back on NeXTSTEP/OPENSTEP, the first argument was supposed to be a short title (one or two words) that would get put in the title bar, and the second was supposed to the main message in the window. Nowadays, the first argument should be the primary message, and the second should be (optional) additional informative text. But the API declarations and documention still refer to things the old way, so we still see lots of unhelpful alert panels like first one below. The most eye-catching part of the message is the command you just entered — you don’t need to have that repeated at you.


A good alert panel is like second picture. The eye-catching bold part tells you all you need to know in order to make a decision, and the secondary text provides extra information about the available options and their effects. (Also note the button titles: they correspond to actions. If the buttons are “Yes” and “No”, you have to carefully read the question, but if they’re “Save” and “Don’t Save”, you know what they will do.)
Even Apple forgets this guideline of theirs occasionally. (Actually, so have we at Omni. Gotta hunt down and fix all those old alert panels…)