I wrote an article over at Stepwise.com that explains how to go about creating a dockling on Mac OS X using a template that I wrote in Cocoa. You can check out the article here
You can also download my DocklingWrapper utility to covert docklings in MacOS X 10.1 compatible applications