Update gorm version and add new code to store/retrieve NSViewBased key

This commit is contained in:
Gregory John Casamento 2024-02-08 05:33:48 -05:00
parent e322757c5f
commit 0be95eba5b
2 changed files with 21 additions and 2 deletions

View file

@ -184,6 +184,7 @@ APPKIT_EXPORT_CLASS
NSDragOperation _draggingSourceOperationMaskForRemote;
NSInteger _beginEndUpdates;
BOOL _viewBased;
}
/* Data Source */

View file

@ -73,7 +73,7 @@
static NSNotificationCenter *nc = nil;
static const int currentVersion = 5;
static const int currentVersion = 6;
static NSRect oldDraggingRect;
static NSInteger oldDropRow;
@ -2044,6 +2044,7 @@ static void computeNewSelection
| NSDragOperationLink | NSDragOperationGeneric | NSDragOperationPrivate;
_draggingSourceOperationMaskForRemote = NSDragOperationNone;
ASSIGN(_sortDescriptors, [NSArray array]);
_viewBased = NO;
}
- (id) initWithFrame: (NSRect)frameRect
@ -5513,6 +5514,9 @@ This method is deprecated, use -columnIndexesInRect:. */
// encode..
[aCoder encodeInt: vFlags forKey: @"NSTvFlags"];
// Encode that the table is view based...
[aCoder encodeBool: _viewBased forKey: @"NSViewBased"];
}
else
{
@ -5548,6 +5552,7 @@ This method is deprecated, use -columnIndexesInRect:. */
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_autoresizesAllColumnsToFit];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_verticalMotionDrag];
[aCoder encodeObject: _sortDescriptors];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_viewBased];
}
}
@ -5696,6 +5701,11 @@ This method is deprecated, use -columnIndexesInRect:. */
[self setUsesAlternatingRowBackgroundColors: tableViewFlags.alternatingRowBackgroundColors];
}
if ([aDecoder containsValueForKey: @"NSViewBased"])
{
_viewBased = [aDecoder decodeBoolForKey: @"NSViewBased"];
}
// get the table columns...
columns = [aDecoder decodeObjectForKey: @"NSTableColumns"];
e = [columns objectEnumerator];
@ -5725,7 +5735,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:)
@ -5745,10 +5755,12 @@ This method is deprecated, use -columnIndexesInRect:. */
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_allowsEmptySelection];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_allowsColumnSelection];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_allowsColumnResizing];
if (version >= 3)
{
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_allowsColumnReordering];
}
if (version >= 2)
{
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_autoresizesAllColumnsToFit];
@ -5758,10 +5770,16 @@ This method is deprecated, use -columnIndexesInRect:. */
{
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_verticalMotionDrag];
}
if (version >= 5)
{
ASSIGN(_sortDescriptors, [aDecoder decodeObject]);
}
if (version >= 6)
{
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_viewBased];
}
if (_numberOfColumns > 0)
{