• 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: Problem with using NSSavePanel's beginSheetForDirectory
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with using NSSavePanel's beginSheetForDirectory


  • Subject: Re: Problem with using NSSavePanel's beginSheetForDirectory
  • From: Scott Anguish <email@hidden>
  • Date: Tue, 11 Mar 2003 22:51:33 -0500

On Tuesday, March 11, 2003, at 06:08 PM, Xiaotao Guo wrote:
The save panel can pop up, and then disappear quickly with myWindow before I
can do anything on it.

Right. Believe it or not, this is probably correct. You're being notified that the window is going to close, and because the sheet only is presented and doesn't run modal, window then closes as is requested.

You want to use a delegate method that will allow you to stop the closing if the document needs to be saved, then present your sheet, and when the sheet is dismissed, then cause the window to close programatically.

Honestly.. this is much easier if you use the Document architecture.. even if you want to only allow a single document window to be open at a time.
_______________________________________________
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.
References: 
 >Problem with using NSSavePanel's beginSheetForDirectory (From: "Xiaotao Guo" <email@hidden>)

  • Prev by Date: Is there a Java Cocoa File Chooser Dialog?
  • Next by Date: NSRunLoop looping more than once?
  • Previous by thread: Problem with using NSSavePanel's beginSheetForDirectory
  • Next by thread: deallocation of related objects
  • Index(es):
    • Date
    • Thread