Skip navigation.
 
mlFSCopyObjectASync callback handler
FROM : Mike Abdullah
DATE : Sun Aug 06 01:36:15 2006

Does anyone here know how to use the callback method for 
FSCopyObjectASync in Cocoa?  I thought it would be as easy as 
creating a function in my controller like so:

static void statusCallback(FSFileOperationRef fileOp, const FSRef 
*currentItem, FSFileOperationStage stage, OSStatus error, 
CFDictionaryRef statusDictionary, void *info)

I start the operation like so:

err = FSCopyObjectAsync(fileOp,
                           &sourceFileRef,
                           &destinationDirectoryRef,
                           (CFStringRef)@"Desktop 2",
                           options,
                           statusCallback,
                           1.0,
                           NULL);

But clearly I'm doing something wrong.  The files copy no problem, 
but my callback never gets, um, called.  I'm assuming that this is 
due to the whole "objects" thing in Cocoa, or is there more to it?

Mike.

Related mailsAuthorDate
mlFSCopyObjectASync callback handler Mike Abdullah Aug 6, 01:36
mlRe: FSCopyObjectASync callback handler Jordan Krushen Aug 6, 03:39
mlRe: FSCopyObjectASync callback handler Mike Abdullah Aug 6, 10:45
mlRe: FSCopyObjectASync callback handler John Stiles Aug 6, 17:42
mlRe: Re: FSCopyObjectASync callback handler Michael Ash Aug 6, 19:31
mlRe: FSCopyObjectASync callback handler Mike Abdullah Aug 6, 22:10
mlRe: Re: FSCopyObjectASync callback handler Michael Ash Aug 6, 22:46
mlRe: FSCopyObjectASync callback handler Rosyna Aug 6, 23:35
mlRe: FSCopyObjectASync callback handler Mike Abdullah Aug 7, 13:22