The CarLot Application uses a data binding for the photo Property, but this binding is deprecated in OS X 10.6.
Through google I’ve find this solution http://forums.macrumors.com/showthread.php?t=781991 that explained that I need a value transformer (http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ValueTransformers/ValueTransformers.html. And gives the code for a custom value transformer.
But in the documentation I’ve found a better solution, that uses no code.
So, I’ve configured the binding as value instead of data and then I’ve used one of the Available Value Transformers:
The NSUnarchiveFromDataTransformerName transformer returns an object created by attempting to unarchive the data in the NSData object passed as the value. The reverse transformation returns an NSData instance created by archiving the value.
An object must implement the NSCoding protocol using sequential archiving in order to be unarchived and archived with this transformer.
The last note is satisfied because NSImage implements NSCoding protocol.
So, this is my solution (is it better the other one? I think so).
But this leave me a question, where can I find info on why something is deprecated in cocoa? In this particular case the data seemed something useful, so why is now deprecated?