Re: Error messages
Re: Error messages
- Subject: Re: Error messages
- From: Jeremy Dronfield <email@hidden>
- Date: Sun, 29 Feb 2004 17:20:09 +0000
On 29 Feb 2004, at 2:03 am, April Gendill wrote:
Ok...
I am working on an application that copies files from point a to point
b. When I run the application normally, it fails about half way
through no matter what you copy. A big folder a small app basically it
just fails.
By "half way through", do you mean half way through the first copy
operation, or half way through a series of copies?
But if I run it through the debugger it works fine. Now the failure
message is NSFDictionary setObject:forKey: attempt to insert null
value...
I assume you're using copyPath:toPath:handler:. Try setting handler to
self and implementing:
-(BOOL)fileManager:(NSFileManager *)manager
shouldProceedAfterError:(NSDictionary *)errorDict
{
int result;
result = NSRunAlertPanel(@"My App", @"File operation error: %@ with
file: %@ copying to:%@", @"Proceed", @"Stop", NULL, [errorDict
objectForKey:@"Error"], [errorDict objectForKey:@"Path"], [errorDict
objectForKey:@"ToPath"]);
if (result == NSAlertDefaultReturn)
return YES;
else
return NO;
}
This method is called when a copy operation fails. It might give you
more information on what's going wrong.
-Jeremy
========================================
email@hidden
theLocustFarm.net:
- fractious fiction at
http://freespace.virgin.net/jeremy.dronfield
========================================
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.