[haiku-development] Re: Patch for trac #2099

On Mon, Apr 21, 2008 at 8:36 AM, SHINTA <shinta.0806@xxxxxxxxx> wrote:
>
> I wonder... _InitObject(BMessage*) is called from only BBox(BMessage*),
> so, initializing vars in _InitObject() and BBox() has save effect. Why
> only fStyle is initialized in BBox() while fLabel and so on is
> initialized in _InitObject()?

The member fStyle is not archived if it is B_FANCY_BORDER since that
is the default value. Default values are never archived. All the other
fields are archived, so only fStyle needs to be initialized in
BBox(BMessage*) for the case that it was not archived if it was
B_FANCY_BORDER. It it was archived, that value will overwrite the
default in _InitObject, as it should.

Regards,
Ryan

Other related posts: