Typically, as soon as I posted my question I figured out the answer. So, to 
answer my own question, the difference between NSFileWrapper's -deprecated 
-initSymbolicLinkWithDestination: method and its new 
-initSymbolicLinkWithDestinationURL: method is that the older method 
automatically sets the preferredFilename and the newer method does not (and the 
preferredFilename is necessary for the image to be automatically set for the 
attachment cell). So, whereas on 10.5 and earlier you would write:

NSFileWrapper *fileWrapper = [[NSFileWrapper alloc] 
initSymbolicLinkWithDestination:myPath];

on 10.6 you need to write:

NSFileWrapper *fileWrapper = [[NSFileWrapper alloc] 
initSymbolicLinkWithDestinationURL:[NSURL fileURLWithPath:myPath]];
[fileWrapper setPreferredFilename:[myPath lastPathComponent]];

Apologies if that was obvious to the rest of the world and his dog, but it had 
me stumped for a little while there.

All the best,
Keith


      
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to