While I am hoping for a quick solution from the Internet (that's you), I'm poking around. First off, I love the INF code. It is beautifully organized. I have debugged some crap in my day, and I picked up how this worked in minutes. Love. It.
Contrarily, the problem lies in the craphole that is CXMLElement. It puts a "a" where it should put an "o".
Code: Select all
// Create nested array
if ([objType isEqualToString:@"a"]) {
newObj = [NSMutableArray array];
}
// Create nested object
else if ([objType isEqualToString:@"o"]) {
newObj = [NSMutableDictionary dictionary];
}
It is INFSmartFoxSerilizer::xml2obj who gets tricked by the bug. He makes a NSArray and then recurses in to fill it out. When he gets to the data, he has the correct stuff: varname = "Mel", varval = 1.
Code: Select all
if ([*o isKindOfClass:[NSDictionary class]]) {
[*o setObject:varValue forKey:varName];
}
else {
[*o addObject:varValue];
}
But then because of the o->a mistake, the name is just forgotten.
I'm going to slog through the very non-beautiful cXML stuff now, but that's where I am now. This seems like an actual real system bug and not just me screwing something up.