The Console logs the output (some extra stuff has been stripped out):
However, if you try the same procedure with an array containing things that can't be saved in this way (like NSColor) the file write method fails silently, with no indication of why it failed. You must do something like this:
The actual archiving step is a single line. In this case, however, the array is a mixture of different types. For the archiving step, I can test "if ([[obj class] isEqual:[c class]])", but on unarchiving, I think I have to know which objects need to be unarchived. Cocoa knows what they are, but I don't.
There is probably a better way to keep it all straight. Tell me if you know.