Via Michael Tsai: Predictably, someone looked into how Leopard’s Dock manages to keep iCal’s icon up-to-date so that it always shows the current date – even when iCal itself is not running.
It turns out this is not an iCal-specific hack, but rather an undocumented (und thus potentially volatile; developers should not depend on it) new capability known as a DockExtra. An application simply specifies a path to a bundle in a key named DockExtra. The bundle, then, needs to implement certain functions to decide when to redraw the icon, and to actually handle the drawing. Finally, SystemUIServer loads the bundle and constantly keeps it in memory.
Perhaps Apple will one day make this a public API. CocoaDev wiki entry, anyone?
“DockExtras” were discussed all the way back in 2001, but those are probably Docklings instead, which haven’t been used much at all in half an eternity; pretty much ever since 10.1 introduced Menu Extras. (Does the current Dock even permit them any more?) Also of note: someone else figured all this out about a week earlier.
Others' Thoughts
Comment on November 10th, 2007 at 6:58 am
Regarding previous discussion of Dock Extras, there is a completely different class hierarchy called NSDockExtra in SystemUIPlugin.framework. It appears to be the base of a hierarchy used both for docklings and for standard application tiles. I think the system stopped supporting docklings as of 10.2, though.
Your Own Thoughts
I'd love to hear your input. Just try to stick to a few rules:
Before you comment for the first time (or, after you have deleted cookies), you will have to answer a little challenge to prove that you are not a spammer.
Comments are written in Markdown.