• 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: Pattern for plugins, archiving, and dynamic document data model?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pattern for plugins, archiving, and dynamic document data model?


  • Subject: Re: Pattern for plugins, archiving, and dynamic document data model?
  • From: "Erik M. Buck" <email@hidden>
  • Date: Thu, 30 Aug 2001 11:37:57 -0500

Our approach to your problem follows:

We store all document data as ASCII text. XML or old style property lists
are fine.
When we read document data, we read plain strings and store them.

We build the model object graph by giving each model object including
available plugins a chance to instantiated themselves based on the ASCII
data. Any ASCII data that is not claimed by any model object is preserved
unmodified as ASCII data. When we save the model, each object in the
model's graph of objects contributes ASCII text. The collection of ASCII
text from all of the model objects and from the unclaimed ASCII text is
written.

All of this is made easier because we have code to archive arbitrary objects
graphs as ASCII property lists and read them back. Multiple references to
the same object are preserved. Cycles are not a problem. Conditional
archiving is supported. It works just like NSCoder except that the encode
methods are different and it stores ASCII rather than binary.


References: 
 >Pattern for plugins, archiving, and dynamic document data model? (From: "l.m.orchard" <email@hidden>)

  • Prev by Date: Re: Return and Enter keys in NSTextView
  • Next by Date: Toolbars and Plugins and a Giant Panda
  • Previous by thread: Pattern for plugins, archiving, and dynamic document data model?
  • Next by thread: NSCursor and 1 bit mask ?
  • Index(es):
    • Date
    • Thread