bug-gnustep
[Top][All Lists]
Advanced

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

Fix: GMAppKit.m (NSCell), -encodeWithModelArchiver:


From: Georg Fleischmann
Subject: Fix: GMAppKit.m (NSCell), -encodeWithModelArchiver:
Date: Fri, 7 Jun 2002 20:13:54 GMT

Hi,

here is a patch for model archiving (nib2gmodel) which fixes the encoding of  
[NSCell isContinuous] (and -sendActionMask:).
The actionMask is now restored after reading (and nullifying) it with 
sendActionOn:0.
This change makes sure the values are still valid, when written in the second 
pass.

Georg



2002-06-07  Georg Fleischmann
        * gui/Model/GMAppKit.m [NSCell -encodeWithModelArchiver:]:
        restore sendActionMask



*** gui/Model/GMAppKit.m.old    Wed Apr 24 15:37:45 2002
--- gui/Model/GMAppKit.m        Thu Jun  6 19:52:47 2002
***************
*** 229,235 ****
  @implementation NSCell (GMArchiverMethods)

  - (void)encodeWithModelArchiver:(GMArchiver*)archiver
! {
      [archiver encodeInt:[self type] withName:@"type"];
      [archiver encodeObject:[self font] withName:@"font"];
      [archiver encodeString:[self stringValue] withName:@"stringValue"];
--- 229,236 ----
  @implementation NSCell (GMArchiverMethods)

  - (void)encodeWithModelArchiver:(GMArchiver*)archiver
! {   int       actionMask;
!
      [archiver encodeInt:[self type] withName:@"type"];
      [archiver encodeObject:[self font] withName:@"font"];
      [archiver encodeString:[self stringValue] withName:@"stringValue"];
***************
*** 245,251 ****
      [archiver encodeBOOL:[self isSelectable] withName:@"isSelectable"];
      [archiver encodeBOOL:[self isScrollable] withName:@"isScrollable"];
      [archiver encodeBOOL:[self isContinuous] withName:@"isContinuous"];
!     [archiver encodeInt:[self sendActionOn:0] withName:@"sendActionMask"];
  }

  - (id)initWithModelUnarchiver:(GMUnarchiver*)unarchiver
--- 246,254 ----
      [archiver encodeBOOL:[self isSelectable] withName:@"isSelectable"];
      [archiver encodeBOOL:[self isScrollable] withName:@"isScrollable"];
      [archiver encodeBOOL:[self isContinuous] withName:@"isContinuous"];
!     actionMask = [self sendActionOn:0];
!     [archiver encodeInt:actionMask withName:@"sendActionMask"];
!     [self sendActionOn:actionMask];
  }

  - (id)initWithModelUnarchiver:(GMUnarchiver*)unarchiver



reply via email to

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