• 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
Pre-flighting save
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Pre-flighting save


  • Subject: Pre-flighting save
  • From: Mark Alldritt <email@hidden>
  • Date: Tue, 12 Apr 2005 15:17:15 -0700

Hi All,

I need to intercept the document saving process (both via File/Save and
window close).

My application is an AppleScript IDE where the document may contain syntax
errors that prevent it from being saved.  When this happens, I need to show
the error and offer to save the document in a textual format which allows
the errors to remain uncorrected.

I have a few other situations where I need to pre-flight saves.  For
instance, if the user attempts to save over a running AppleScript applet, I
want to (a) warn the user, and (b) offer to the Quit the applet and continue
the save.

I've been looking at the
canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo: method, but
its not clear to me how to do what I want to do.  Does anyone have any
suggestions or pointers to examples illustrating how to do this kind of
thing.

Thanks
-Mark

------------------------------------------------------------------------
Mark Alldritt                      Late Night Software Ltd.
Phone: 250-380-1725                Script Debugger 3.0 - AppleScript IDE
WEB:  http://www.latenightsw.com/  Affrus 1.0 - Perl Debugging

 _______________________________________________
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

  • Prev by Date: Re: Order of instantiation within a NIB
  • Next by Date: NSCustomImageRep won't draw
  • Previous by thread: Re: Tiger development Panther deployment
  • Next by thread: NSCustomImageRep won't draw
  • Index(es):
    • Date
    • Thread