• 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
Checking document structure in NSDocument based app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Checking document structure in NSDocument based app


  • Subject: Checking document structure in NSDocument based app
  • From: Luc Van Bogaert <email@hidden>
  • Date: Tue, 27 Nov 2012 19:08:45 +0100

Hi,

I have a document based app with one NSDocument subclass, and one NSWindowController subclass. NSDocumentController is not subclassed at the moment. The functionality of my application has expanded over time, and so has the internal structure of my document subclass : extra properties and methods have been added. As a result, documents that were created with an early version of my app are no longer 'compatible' with the current version of the application. For instance, I've added bindings using keypaths that don't even exist in these early documents.

I'm now thinking about a way to handle this properly. I would accept the fact that the app is not backward compatible, but I know I should properly handle any requests to open those old document formats. I'm more or less clueless on how to do this. I'm thinking that I may need to subclass NSDocumentController and override addDocument: so I could check against the document version before allowing the app to actually open it.

Any advice on how to do this would be greatly appreciated.
Thanks,

--
Luc Van Bogaert

_______________________________________________

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: Checking document structure in NSDocument based app
      • From: Seth Willits <email@hidden>
    • Re: Checking document structure in NSDocument based app
      • From: Quincey Morris <email@hidden>
    • Re: Checking document structure in NSDocument based app
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: Cocoa | Reading Plist/file version of Native binary
  • Next by Date: Re: Cocoa | Reading Plist/file version of Native binary
  • Previous by thread: Re: Cocoa | Reading Plist/file version of Native binary
  • Next by thread: Re: Checking document structure in NSDocument based app
  • Index(es):
    • Date
    • Thread