discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC: Appreciation of .gmodel format (was deprecation)


From: Gregory John Casamento
Subject: Re: RFC: Appreciation of .gmodel format (was deprecation)
Date: Tue, 6 Jan 2004 16:54:43 -0800 (PST)

--- Alexander Malmberg <address@hidden> wrote:
> Gregory John Casamento wrote:
> > --- Georg Fleischmann <address@hidden> wrote:
> > > Additionally, I'm a fan of ASCII formats like gmodel-files (or
> Renaissance),
> > > so I never thought much of using Gorm yet. I'm more of waiting for some
> ASCII
> > > support of Gorm.
> > 
> > Gorm's output format is dependent on NSData which, by default, encodes
> objects
> > in binary form.   If this could be changed it would definitely be an
> advantage,
> > since it would mean that *all* data encoded by GNUstep programs would be
> output
> > to text-based formats instead of binary.
> 
> 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.
> 
> - Alexander Malmberg

Actually I was thinking of something like...

Since, during encoding, you know what type/class and the data, it's concievable
that you could produce something like:

<object>
   <integer value="1">
   <string value="a string">
</object>

of course, since the archiver writes things in sequence, it wouldn't be
possible to determine the name of the ivar being encoded.

GJC

=====
Gregory John Casamento -- CEO/President Open Logic Corp.
-- bheron on #gnustep, #linuxstep, & #gormtalk ---------------- 
Please sign the petition against software patents at: 
http://www.petitiononline.com/pasp01/petition.html 
-- Main Developer of Gorm (featured in April Linux Journal) ---

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]