[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
decoding problem of NSParagraphstyle
From: |
Sebastian Reitenbach |
Subject: |
decoding problem of NSParagraphstyle |
Date: |
Fri, 17 May 2013 15:24:35 +0200 |
User-agent: |
SOGoMail 2.0.5a |
Hi,
I found that Grr is unable to open its Gorm files on amd64. First I thought
that resaving the gorm files might help, but that didn't worked out.
After a closer look I found that the patch below helps.
The patch is against latest release, but I also haven't seen any changes in
trunk against NSParagraphStyle.m since
then.
I guess the patch might break gorm files which are created since SVN rev
r36154, where it seems, Fred changed
the coding/encoding for that.
Sebastian
$OpenBSD$
--- Source/NSParagraphStyle.m.orig Sun Mar 17 20:53:50 2013
+++ Source/NSParagraphStyle.m Fri May 17 14:13:52 2013
@@ -236,7 +236,7 @@ static NSParagraphStyle *defaultStyle = nil;
{
/* Set the class version to 2, as the writing direction is now
stored in the encoding */
- [self setVersion: 2];
+ [self setVersion: 3];
}
}
@@ -494,9 +494,18 @@ static NSParagraphStyle *defaultStyle = nil;
[aCoder decodeArrayOfObjCType: @encode(float)
count: count
at: locations];
- [aCoder decodeArrayOfObjCType: @encode(NSInteger)
+ if ([aCoder versionForClassName: @"NSParagraphStyle"] >= 3)
+ {
+ [aCoder decodeArrayOfObjCType: @encode(NSInteger)
count: count
at: types];
+ }
+ else
+ {
+ [aCoder decodeArrayOfObjCType: @encode(int)
+ count: count
+ at: types];
+ }
for (i = 0; i < count; i++)
{
NSTextTab *tab;
- decoding problem of NSParagraphstyle,
Sebastian Reitenbach <=