• 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
more than one plist in a file.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

more than one plist in a file.


  • Subject: more than one plist in a file.
  • From: Paul Thomas <email@hidden>
  • Date: Wed, 30 Nov 2005 19:56:45 +0000

Hi list,

I have an application that is logging events (date + string + attributed string) to a file and I want to be able to read in the file when I restart the app. I can't use a straight forward plist (array of dictionary of {date,string,data}) because the files can get large and I don't want to rewrite the entire file to append a single event. So I am using a NSFileHandle to append the data and I don't want to have to write my own encoding/decoding routines. Is there anyway to reuse the plist architecture for this?

Writing a plist for every event using NSPropertyListSerialization only half works because I can't find the start of the next plist when it comes to reading the file back in. Plus it bloats the file somewhat.

Ideally, I'd like my log file to look like
...
<date>blah blah</date>
<string>bork bork</string>
...
and so on without the greater structure.
My only alternative seems to be to use the scanner.

Maybe I'm completely missing the point though?


Thanks, Paul.


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: more than one plist in a file.
      • From: Markus Hitter <email@hidden>
    • Re: more than one plist in a file.
      • From: "I. Savant" <email@hidden>
  • Prev by Date: Re: class changes and serialized objects in a nib file
  • Next by Date: Re: NSComboBox Coredata bindings
  • Previous by thread: Re: class changes and serialized objects in a nib file
  • Next by thread: Re: more than one plist in a file.
  • Index(es):
    • Date
    • Thread