RE: saveAs problems
RE: saveAs problems
- Subject: RE: saveAs problems
- From: <email@hidden>
- Date: Wed, 4 Feb 2004 01:04:56 +0100
- Thread-topic: saveAs problems
Peter,
I really have not done anything special, I fully rely on the NSDocument method saveDocumentAs:
, I do not override it. Everything goes fine, the document is saved correctly. But even before the savepanel popups up, your document is kind of refreshed, like if a new document is instantiated and filled with the data of the older one....
Alex
-----Original Message-----
From: Peter Hudson [
mailto:email@hidden]
Sent: Wed 2/4/2004 12:36 AM
To: Alexander Griekspoor
Cc:
Subject: saveAs problems
can you send me the code for your save as method ?
I do this process with something along these lines
savePanel = [NSSavePanel savePanel];
[savePanel setRequiredFileType:@"yourExtension"];
returnVal = [savePanel runModal];
if( returnVal == NSOKButton )
{
fullPath = [savePanel fileName];
[self writeToFile:fullPath ofType:[self fileType]];
[self setFileName:fullPath]
[self saveDocument:self]; // puts you in the Recent File list
Thats the general idea of what I do and it works fine.
Peter
_______________________________________________
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.