• 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
NSDocument saving query
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSDocument saving query


  • Subject: NSDocument saving query
  • From: Michael McLaughlin <email@hidden>
  • Date: Thu, 14 Apr 2016 14:55:58 -0400

I am creating an Objective-C document app with the latest version of Xcode.

Scenario as follows:

A user selects File/New and, after creating a new document along with its window, my IBAction for this ends with

[newDoc saveDocumentAs:self];

displaying the usual Save panel.

However, the user might Cancel. In this case, I would like to close the window and discard the new document.  My problem is that saveDocumentAs returns void, not BOOL indicating success (or not).

What is the recommended way to capture a Cancel in this case? Any sample code available?

Thanks.

--
Michael McLaughlin
email@hidden





_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: NSDocument saving query
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Proper way to set up constants when building an iOS framework
  • Next by Date: Re: NSDocument saving query
  • Previous by thread: Re: Proper way to set up constants when building an iOS framework
  • Next by thread: Re: NSDocument saving query
  • Index(es):
    • Date
    • Thread