• 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
Overriding the automatic-save type
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Overriding the automatic-save type


  • Subject: Overriding the automatic-save type
  • From: Daryle Walker <email@hidden>
  • Date: Sun, 05 Mar 2017 20:03:04 -0500

The NSDocument property “autosavingFileType” lets the developer indicate which one of the types the document class supports will be the one used for auto-saves. The notes at the website suggest that “init(for: withContentsOf: ofType:)” be overridden too. It punts to the TextEdit sample document class, but I don’t see anything that would help. However, could I use “NSDocumentController.typeForContents(of:)” to fill in the original file’s type?

—
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com

_______________________________________________

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


  • Prev by Date: Re: Issue with addTitlebarAccessoryViewController on 10.10
  • Next by Date: Enforcing Editor vs. Viewer (was: Which way should my document class handle an older format?)
  • Previous by thread: Enforcing Editor vs. Viewer (was: Which way should my document class handle an older format?)
  • Next by thread: boundingRectForGlyphRange is very inaccurate
  • Index(es):
    • Date
    • Thread