bug-gnustep
[Top][All Lists]
Advanced

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

RFA: [HEAD] NSCell encodeWithCoder: backwards compatibility


From: David Ayers
Subject: RFA: [HEAD] NSCell encodeWithCoder: backwards compatibility
Date: Thu, 20 Mar 2003 12:30:26 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20030210

Hello,

Current CVS of the mainline will encode the value of isSelectable into the slot of isContinous. This is of no direct relevance for anyone using mainline per se as that slot gets ignored during decoding but anyone using mainline to create archives (i.e. gorm files) will create archives that other users using the release branch but the newer archives will decode faulty information. This patch temporarly reactivates the encoding of isContinous in the applicable slot. I think we should stay backward compatible for at least one release cycle with archives (if possible).

I'd like to commit this soon, if there are no objections.

I would also advise anyone createing archive with NSCell's (i.e. gorm files) to refrain from updating to CVS before this is resolved.

Cheers,
Dave

2003-03-20  David Ayers  <d dot ayers at inode dot at>

       * Source/NSCell.m ([NSCell encodeWithCoder:]): Reinsert encoding
       of isContinuous to insure backward compatiblity of archives.

Index: core/gui/Source/NSCell.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/gui/Source/NSCell.m,v
retrieving revision 1.142
diff -u -r1.142 NSCell.m
--- core/gui/Source/NSCell.m    18 Mar 2003 23:49:42 -0000      1.142
+++ core/gui/Source/NSCell.m    20 Mar 2003 11:13:06 -0000
@@ -1945,7 +1945,10 @@
  flag = _cell.is_selectable;
  [aCoder encodeValueOfObjCType: @encode(BOOL) at: &flag];
  // This used to be is_continuous, which has been replaced.
-  //flag = _cell.is_continuous;
+  /* Ayers 20.03.2003: But we must continue to encode it for backward
+     compatibility or current releases will have undefined behavior when
+     decoding archives (i.e. .gorm files) encoded by this version. */
+  flag = [self isContinuous];
  [aCoder encodeValueOfObjCType: @encode(BOOL) at: &flag];
  flag = _cell.allows_mixed_state;
  [aCoder encodeValueOfObjCType: @encode(BOOL) at: &flag];






reply via email to

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