From f69ffcb8e38608324dccddcd8d118b49fcf6fba7 Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Sat, 2 Jul 2011 19:41:38 +0000 Subject: [PATCH] Changes to encode and decode sortDescriptors into the gorm file. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33430 72102866-910b-0410-8b05-ffd578937521 --- Source/NSTableView.m | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Source/NSTableView.m b/Source/NSTableView.m index 607887e2b..b438135de 100644 --- a/Source/NSTableView.m +++ b/Source/NSTableView.m @@ -69,7 +69,7 @@ #include static NSNotificationCenter *nc = nil; -static const int currentVersion = 4; +static const int currentVersion = 5; static NSRect oldDraggingRect; static int oldDropRow; @@ -5459,6 +5459,7 @@ This method is deprecated, use -columnIndexesInRect:. */ [aCoder encodeValueOfObjCType: @encode(BOOL) at: &_allowsColumnReordering]; [aCoder encodeValueOfObjCType: @encode(BOOL) at: &_autoresizesAllColumnsToFit]; [aCoder encodeValueOfObjCType: @encode(BOOL) at: &_verticalMotionDrag]; + [aCoder encodeObject: _sortDescriptors]; } } @@ -5634,7 +5635,7 @@ This method is deprecated, use -columnIndexesInRect:. */ _cornerView = RETAIN([aDecoder decodeObject]); aDelegate = [aDecoder decodeObject]; _target = [aDecoder decodeObject]; - + [self setDelegate: aDelegate]; [_headerView setTableView: self]; [_tableColumns makeObjectsPerformSelector: @selector(setTableView:) @@ -5664,6 +5665,10 @@ This method is deprecated, use -columnIndexesInRect:. */ { [aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_verticalMotionDrag]; } + if (version >= 5) + { + ASSIGN(_sortDescriptors, [aDecoder decodeObject]); + } if (_numberOfColumns > 0) {