PDA

View Full Version : Understanding plists...




netytan
Oct 31, 2004, 10:28 AM
I'm pretty new to Cocoa; I have been reading though the developers documentation for quite a while. I just can't seem to figure out the whole plist thing, so I have a few simple questions :D...

1. What exactly is a plist?
2. What kind of things are they used for?
3. Whats the difference between the plists written in curly braces and the plists written in XML format?
4. If there isn't a real difference then can the plists be interchanged i.e. could i change a curly brace style plist to an XML style plist?

Thanks much guys,

Mark.



robbieduncan
Oct 31, 2004, 02:15 PM
I'm pretty new to Cocoa; I have been reading though the developers documentation for quite a while. I just can't seem to figure out the whole plist thing, so I have a few simple questions :D...

1. What exactly is a plist?

It's a property list. Basically a way of serialising object data to disk.

2. What kind of things are they used for?

See above :)

3. Whats the difference between the plists written in curly braces and the plists written in XML format?

Curly brace ones are legacy (from NeXT days I think). The current tool set will load them, but nothing recent should be writing them. The XML type support more data types as well.

4. If there isn't a real difference then can the plists be interchanged i.e. could i change a curly brace style plist to an XML style plist?

Thanks much guys,
Mark.
Sure if you want to.

netytan
Oct 31, 2004, 02:33 PM
Xcode is still using the legacy style plists for example, so it got me wondering if I could recreate these as XML plists without it causing any problems to the program?

Anyway, thank you for the reply! Clears up some of my thinking :cool:

Mark.

robbieduncan
Oct 31, 2004, 03:10 PM
Slightly strange! It is probably because XCode is still Project Builder (which was carried over from the NeXT days) underneath.

netytan
Oct 31, 2004, 06:31 PM
Yeah, hopefully Apple has fixed all this for Xcode 2.0 :). Along with the weird extension system & file naming!