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

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.

  • Prev by Date: Re: Newbie and NSLayoutManager
  • Next by Date: Re: Newbie thread question
  • Previous by thread: Panther: Regression in NSOpenPanel?
  • Next by thread: Re: sqlite and LIKE
  • Index(es):
    • Date
    • Thread