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

Re: Document Saved


  • Subject: Re: Document Saved
  • From: Clark Cox <email@hidden>
  • Date: Fri, 7 Jan 2005 13:30:46 -0500

On Fri, 7 Jan 2005 19:05:50 +0100, Luca Torella <email@hidden> wrote:
> Hello,
>         I'd like to perform some actions after saving a document but I haven't
> found an appropriate delegate method of NSDocument. I'm looking for
> something like -didFinishSaving.
>
> Any idea?

I don't see anything like what you're looking for, but you could
probably do something in your NSDocument subclass like (warning, typed
in mail):

- (BOOL)writeToFile:(NSString *)fileName ofType:(NSString *)type
{
  if([super writeToFile: fileName ofType:type])
  {
    [self didSaveDocument]; /*Or call some method on your delegate,
after checking that it responds*/
    return YES;
  }

   return NO;
}

--
Clark S. Cox III
email@hidden
http://www.livejournal.com/users/clarkcox3/
http://homepage.mac.com/clarkcox3/
 _______________________________________________
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

References: 
 >Document Saved (From: Luca Torella <email@hidden>)

  • Prev by Date: Re: Cocoa Bindings - nondebuggable, non-obvious, procedural ???
  • Next by Date: Re: NSSound and _NSAutoreleaseNoPool() - just leaking
  • Previous by thread: Document Saved
  • Next by thread: NSTableView, binding, and tooltips
  • Index(es):
    • Date
    • Thread