[interfacekit] archiving...

Hi ALL!


Another question for you:

    I've instantiated a view with the following frame rectangle:
const BRect  v1Rect(100, 50, 300.75, 100);

    I archived the view and printed it to screen:
BMessage: what =  (0x0, or 0)
    entry          class, type='CSTR', c=1, size=6, data[0]: "BView"
    entry          _name, type='CSTR', c=1, size=6, data[0]: "View1"
    entry         _frame, type='RECT', c=1, size=16, data[0]: BRect(l:100.0,
t:50.0, r:301.0, b:100.0)
    entry          _mine, type='FLOT', c=1, size= 4, data[0]: 1.2700

NOTE: field "_mine" is added by me.

If you notice, the archived frame coordinates are rounded!!!
    [ the bottom right corner is at (301.0, 100.0) instead of (300.75,
100.0)]

    I think this is a BAD thing, because when instantiated form archive, the
view would lose its real coordinates!
    And, those, real coordinates are used when printing, isn't it?

[this is from disassembly code]
    BView::Frame(){
        ...
        IsPrinting();
        ...
    }

    I think this is a bug, I think we should store the real coordinates!

    What do you think???


Adi.



Other related posts: