Writing a subclass of NSData (or, more appropriately, NSCoder) that
encodes as text is fairly easy, but also pointless. The resulting text
would be no more readable than the output of 'hexdump foo.gorm'. Eg. for
NSView, we have:
...
[aCoder encodeRect: _frame];
[aCoder encodeRect: _bounds];
[aCoder encodeValueOfObjCType: @encode(BOOL) at:
&_is_rotated_from_base];
[aCoder encodeValueOfObjCType: @encode(BOOL)
at: &_is_rotated_or_scaled_from_base];
[aCoder encodeValueOfObjCType: @encode(BOOL) at:
&_post_frame_changes];
[aCoder encodeValueOfObjCType: @encode(BOOL) at:
&_autoresizes_subviews];
[aCoder encodeValueOfObjCType: @encode(unsigned int) at:
&_autoresizingMask];
...
so instead of a bit of binary data, you'd get something like "0.0 0.0
100.0 100.0 0.0 0.0 100.0 100.0 0 0 0 1 5" .... Sure, it's text, but
you'd go insane if you tried to edit it by hand. :)
I believe what Georg Fleischmann wants isn't just a text format, it's a
structured, human readable text format.