Using NSXMLParser
why does this line of code cause an exception:
ushort crash = [[attributeDict objectForKey:@"a"] unsignedShortValue];
The value in the xml file is "0"
if I use integerValue it works
what is happening?
Using NSXMLParser
why does this line of code cause an exception:
ushort crash = [[attributeDict objectForKey:@"a"] unsignedShortValue];
The value in the xml file is "0"
if I use integerValue it works
what is happening?
If you looked at the object throwing the exception, you would see it's something that doesn't have an unsignedShortValue method — I think NSString in this case.