FROM : Rosyna
DATE : Sun Aug 06 23:35:51 2006
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.
DATE : Sun Aug 06 23:35:51 2006
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.
| Related mails | Author | Date |
|---|---|---|
| Mike Abdullah | Aug 6, 01:36 | |
| Jordan Krushen | Aug 6, 03:39 | |
| Mike Abdullah | Aug 6, 10:45 | |
| John Stiles | Aug 6, 17:42 | |
| Michael Ash | Aug 6, 19:31 | |
| Mike Abdullah | Aug 6, 22:10 | |
| Michael Ash | Aug 6, 22:46 | |
| Rosyna | Aug 6, 23:35 | |
| Mike Abdullah | Aug 7, 13:22 |






Cocoa mail archive

