Fix handling of custom classes for XIB v5. This corrects an issue in Gorm as well

This commit is contained in:
Gregory John Casamento 2023-12-16 08:00:33 -05:00
parent e28e27ff08
commit d9fa73870a

View file

@ -310,6 +310,7 @@
objects = [[NSMutableDictionary alloc] init];
stack = [[NSMutableArray alloc] init];
decoded = [[NSMutableDictionary alloc] init];
_customClasses= [[NSMutableDictionary alloc] init];
}
- (id) initForReadingWithData: (NSData*)data
@ -318,18 +319,16 @@
NSXMLParser *theParser;
NSData *theData = data;
// Dictionary which contains custom class information for Gorm/IB.
_customClasses = [[NSMutableDictionary alloc] init];
// Initialize...
[self _initCommon];
// Prepare the XIB data for parsing...
theData = [self _preProcessXib: data];
if (theData == nil)
{
return nil;
}
// Initialize...
[self _initCommon];
theParser = [[NSXMLParser alloc] initWithData: theData];
[theParser setDelegate: self];