• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: FSCopyObjectASync callback handler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FSCopyObjectASync callback handler


  • Subject: Re: FSCopyObjectASync callback handler
  • From: Mike Abdullah <email@hidden>
  • Date: Mon, 7 Aug 2006 12:22:53 +0100

Briilliant! I had no idea you had to do scheduling like that as well. Works great now :)

Mike.

On 6 Aug 2006, at 22:35, Rosyna wrote:

Aside from the issue Mike Ash pointed out, you haven't scheduled the operation.

FSFileOperationScheduleWithRunLoop(fileOp, [[NSRunLoop currentRunLoop] getCFRunLoop], (CFStringRef)NSDefaultRunLoopMode);

Ack, at 8/6/06, Mike Abdullah said:

Well here's my test class:

#import "Controller.h"

@implementation Controller

static void statusCallback(FSFileOperationRef fileOp, const FSRef *currentItem, FSFileOperationStage stage, OSStatus error, CFDictionaryRef statusDictionary, void *info)
{
printf("statusCallback called");
}


- (IBAction)doCopy:(id)sender
{
	OSStatus err;
	FSRef   sourceFileRef, destinationDirectoryRef;

// Build the parameters
FSFileOperationRef fileOp = FSFileOperationCreate (kCFAllocatorDefault);


FSPathMakeRef((UInt8 *)[@"/Users/dev/Desktop/" fileSystemRepresentation], &sourceFileRef, NULL);

FSPathMakeRef((UInt8 *)[@"/Users/dev/" fileSystemRepresentation], &destinationDirectoryRef, NULL);

	OptionBits options = kFSFileOperationDefaultOptions;

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

@end

I click a button in my interface which calls the IBAction method.
Everything seems to work just fine, and the folder (about 2 gigs) is copied. However, the callback is never actually called. Any ideas?

--


Sincerely, Rosyna Keller Technical Support/Holy Knight/Always needs a hug

Unsanity: Unsane Tools for Insanely Great People

It's either this, or imagining Phil Schiller in a thong.


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >FSCopyObjectASync callback handler (From: Mike Abdullah <email@hidden>)
 >Re: FSCopyObjectASync callback handler (From: "Jordan Krushen" <email@hidden>)
 >Re: FSCopyObjectASync callback handler (From: Mike Abdullah <email@hidden>)
 >Re: FSCopyObjectASync callback handler (From: John Stiles <email@hidden>)
 >Re: FSCopyObjectASync callback handler (From: Mike Abdullah <email@hidden>)
 >Re: FSCopyObjectASync callback handler (From: Rosyna <email@hidden>)

  • Prev by Date: Re: QTMovie and threads
  • Next by Date: Core data search and spotlight importer question
  • Previous by thread: Re: FSCopyObjectASync callback handler
  • Next by thread: Re: Re: FSCopyObjectASync callback handler
  • Index(es):
    • Date
    • Thread