File copying not copying...
File copying not copying...
- Subject: File copying not copying...
- From: deekpyro <email@hidden>
- Date: Fri, 12 Apr 2002 22:37:53 -0500
In the declaration below I tell the app when it closes to copy a file over
depending on if theCheckBoxWBC is check or not (state), it compiles and runs
fin but doesn't copy the file over...hum...any thoughts?
- (NSApplicationTerminateReply)applicationShouldTerminate:(id)sender
{
if([theCheckBoxWBC state]) {
[[NSFileManager defaultManager] copyPath:@"/Applications/Moo X
Folder/Files/com.apple.windowserver.plist"
toPath:@"/Library/Preferences/com.apple.windowserver.plist" handler:nil];
} else {
[[NSFileManager defaultManager] copyPath:@"/Applications/Moo X
Folder/Backups/com.apple.windowserver.plist"
toPath:@"/Library/Preferences/com.apple.windowserver.plist" handler:nil];
}
return NSTerminateNow;
}
I would also like to know how to create an error message if these files
can't be found so if anyone knows how to do that that would be great.
Thanks, Derek
_______________________________________________
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.