More – Chapter 9
Chapter 9, "Property Lists," discusses the property list format, the generic form for storing structured data in Mac OS X. It explains what property lists are, how they contain data, and how to edit them. A long example shows how to use the text-based property list form to create text macros for Xcode.
| Page | Priority | Description |
|---|---|---|
| 119 | Medium | DataPoint, not DataPoints |
| 129 | Medium | Editing Property Lists |
| 135 | Low | Where to find the HTML macros |
Chapter 9, page 119
DataPoint, not DataPoints
In the listing on page 119, there appears the line
DataPoints * curr;
This should be
DataPoint * curr;
Chapter 9, page 129
Editing Property Lists
With Xcode 3.1, Apple has introduced a property list editor that appears directly in an editor pane in the Xcode application itself. It works much the same way as the Property List Editor application I describe on page 129, but it adds a few nifty features, such as providing a popup of common keys when you're editing an Info.plist file.
There are a couple of caveats, however:
- In 3.1, the editor is kind of crashy. Apple is aware of the bug, and we can expect it to be fixed in short order; watch the ADC downloads for the next version. In the mean time, save, save, save!
- Project Find will find text in a project's plists just fine, and if you tell it to replace that text, it will act as though it had done so, but text in property lists will not be replaced. Until a fix emerges, you'll have to use the found-string list as a guide, and do your substitutions by hand.
Chapter 9, page 135
Where to find the HTML macros
I said you should base your plist text macros on the HTML macros provided with Xcode, but I didn't say where you could find them. They're at:
Xcode.app/Contents/PlugIns/TextMacros.xctxtmacro/Contents/Resources/HTML.xctxtmacro