Hello,

here is a bug fix for unarchiving a NSScrollView from a gmodel file:
When a NSScrollView is beeing unarchived from a gmodel file, the unarchiving  
of the documentView overwrites the backgroundColor which has already been  
unarchived!

The bugfix simply unarchives the backgroundColor of NSScrollView after setting  
the documentView.
However, it could be a better solution to remove the setting of the  
backgroundColor in [NSScrollView -setDocumentView:] ???


2000-05-12 Georg Fleischmann

        * gui/Model/GMAppKit.m
        ([NSScrollView(GMArchiverMethods) -initWithModelUnarchiver:]):
        move unarchiving of backgroundColor behind documentView


*** gui/Model/GMAppKit.m.old    Fri May 12 15:13:06 2000
--- gui/Model/GMAppKit.m        Fri May 12 14:58:53 2000
***************
*** 487,494 ****

    [self setContentView: AUTORELEASE([NSClipView new])];

-   [self setBackgroundColor:
-     [unarchiver decodeObjectWithName: @"backgroundColor"]];
    [self setBorderType:
      [unarchiver decodeIntWithName: @"borderType"]];
    [self setHasHorizontalScroller:
--- 487,492 ----
***************
*** 497,502 ****
--- 495,502 ----
      [unarchiver decodeBOOLWithName: @"hasVerticalScroller"]];
    [self setDocumentView:
      [unarchiver decodeObjectWithName: @"documentView"]];
+   [self setBackgroundColor:
+     [unarchiver decodeObjectWithName: @"backgroundColor"]];

    return self;
  }


---
Georg Fleischmann

vhf interservice
http://www.vhf.de

Reply via email to