Fixes for formatters, sliders and other classes, stabilizing changes to prevent crashes

This commit is contained in:
Gregory John Casamento 2023-08-27 15:05:47 -04:00
parent 16123a7dd6
commit df327e7fc6

View file

@ -297,6 +297,8 @@ static NSUInteger _count = INT_MAX;
_skipClass =
[[NSArray alloc] initWithObjects:
@"NSBrowserCell",
@"NSDateFormatter",
@"NSNumberFormatter",
nil];
_skipCollectionForKey =
@ -309,6 +311,7 @@ static NSUInteger _count = INT_MAX;
@"owner",
@"subviews",
@"contentView",
@"titleCell",
nil];
_singletonObjects =
@ -448,6 +451,7 @@ static NSUInteger _count = INT_MAX;
@"nextKeyView",
@"prototype",
@"keyCell",
@"isLenient",
nil];
}
}
@ -1092,6 +1096,7 @@ static NSUInteger _count = INT_MAX;
NSUInteger c = 0;
NSUInteger r = 0;
NSArray *cells = [matrix cells];
NSUInteger count = [cells count];
NSUInteger i = 0;
NSXMLElement *cellsElem = [NSXMLNode elementWithName: @"cells"];
NSString *cellClass = nil;
@ -1099,6 +1104,8 @@ static NSUInteger _count = INT_MAX;
NSDebugLog(@"cells = %@\nelem = %@", [matrix cells], elem);
NSLog(@"WARNING: NSMatrix is not fully supported by Xcode, this might cause it to crash or may not be reloadable by this application");
if (count > 0)
{
[elem addChild: cellsElem];
for (c = 0; c < itemsPerCol; c++)
{
@ -1109,6 +1116,13 @@ static NSUInteger _count = INT_MAX;
id cell = nil;
i = (c * itemsPerCol) + r;
// If we go past the end of the array...
if (i >= count)
{
continue;
}
cell = [cells objectAtIndex: i];
if (cellClass == nil)
{
@ -1120,6 +1134,7 @@ static NSUInteger _count = INT_MAX;
}
[cellsElem addChild: columnElem];
}
}
// Add the cell class, so that it doesn't crash on reload...
if (cellClass != nil)