• 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: Error messages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Error messages (From: April Gendill <email@hidden>)

  • Prev by Date: Re: Databasing and Cocoa
  • Next by Date: Trouble accessing Objective-C++ code from a C++ thread
  • Previous by thread: Re: Error messages
  • Next by thread: Defining custom mime type in WebView?
  • Index(es):
    • Date
    • Thread