I read over the docs for this function and not coming to the same conclusions. Being an async function it should be implied the callback will be used if the starting function succeeded. This is the whole point of async operations and the only way to get status reports from them besides having to poll, which defeats the purpose of async operations. Also, the minimum time argument as the docs explains is there to limit the time between multiple calls for a "single stage" (ie kFSOperationStageRunning) for flood prevention and doesn't apply to stage changes. Also, the presence of a "kFSOperationStageComplete: The file operation is complete." makes it pretty clear there should be a status report upon completion.

The only error here I believe, as explained by someone else, is forgetting to schedule the event source with the runloop for processing. However after reading the docs I too am lead to believe (and know from experience with this function) that the callback is used and is called upon completion.



On May 1, 2008, at 1:39 AM, Mike Fischer wrote:

Am 01.05.2008 um 06:55 schrieb Matt Long <[EMAIL PROTECTED]>:

I execute this code and it successfully copies my file from source to
destination:

[snip]

status returns with no error. However my callback never gets called.

Why do you assume it should be called? You passed a minimum of 1 second as statusChangeInterval so if the operation is done in less than a second then I would not expect it to be called. Even if it takes longer the documentation doesn't guarantee anything about when it is supposed to trigger the callback AFAICT. Specifically documetation does not mention that the callback will be called on completion of the operation.

[snip]


Any idea why?

Wrong assumptions?

_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to