I recall implementing it for Carbon but I don't have the experience with Cocoa at this point.
Sent from my portable device, please excuse the brevity.