• 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
How to wire up document exporting?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to wire up document exporting?


  • Subject: How to wire up document exporting?
  • From: Charles Jenkins <email@hidden>
  • Date: Wed, 28 Jan 2015 19:16:26 -0500

To save my app’s native document format, I overrode NSDocument’s fileWrapperOfType:error:. I have assumed that the reason I produce data something else actually writes out is because the OS has security features, and a sandboxed app is not allowed to create arbitrary files on the filesystem.

I need to have a File > Export command to save the document in OpenXML format. I’ve done some research in the Developer Library, and the best clues I’ve found so far are in the Sketch app. Sketch manages multiple output types by overriding NSDocument’s dataOfType:error: and paying attention to the requested type name. Somehow that gets called by saveDocumentTo:

My app needs to work more like Pages, by presenting a dialog confirming export options before the OpenXML file is generated. I can see where I might have to do this by overriding saveDocumentTo: so my options dialog will appear and eventually dataOfType:error: will be called. But I’m worried that dataOfType and fileWrapperOfType can’t both be used???

Am I on the right track here, or is there some other path Export menu items should take?

—

Charles Jenkins

_______________________________________________

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: How to wire up document exporting?
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: iOS 6 and 6 plus artwork
  • Next by Date: Allow tap events outside a custom UIPresentationController on iPad(iOS 8)
  • Previous by thread: Re: iOS 6 and 6 plus artwork
  • Next by thread: Re: How to wire up document exporting?
  • Index(es):
    • Date
    • Thread