Remember last saved file
Remember last saved file
- Subject: Remember last saved file
- From: Neto <email@hidden>
- Date: Fri, 9 Jun 2006 01:58:48 -0300
Hi all,
I'm using this to make my application remember the last saved file:
- (BOOL)writeToURL:(NSURL *)absoluteURL
ofType:(NSString *)typeName
forSaveOperation:(NSSaveOperationType)saveOperation
originalContentsURL:(NSURL *)absoluteOriginalContentsURL
error:(NSError **)error
{
[[[NSUserDefaultsController sharedUserDefaultsController] values]
setValue: [NSArchiver archivedDataWithRootObject:
absoluteOriginalContentsURL] forKey:@"lastFileURL"];
return [super writeToURL: absoluteURL
ofType: typeName
forSaveOperation: saveOperation
originalContentsURL: absoluteOriginalContentsURL
error: error];
}
The problem is it only works if the user SAVE. It is not working for
SAVE AS...
Any tips?
neto
_______________________________________________
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