from the discussion of Martin R and Droppy above.. I figured out this was happening.
In the original code I was getting the taxiAmount
value from an http call like so:
[serverGateway_ getTaxiAmountWithCoordinate:coordBlock onSuccessBlock:^(NSData *responseData)
{
[parser_ parseTaxiAmountWithData:responseData onSuccessBlock:^(NSNumber *taxiAmount)
{
[cityManager_ setTaxiAmount:taxiAmount];
so I was sending an NSNumber
value to a NSInteger
varialbe
- (void)setTaxiAmount:(NSInteger)taxiAmount
{
taxiAmount_ = taxiAmount;
}
in this case typing po taxiAmount
returned 0, whereas p taxiAmount
returned 180520272:
so what was causing this whole hoopala was treating a NSNumber as an NSInteger.. obviously correcting the line to
[cityManager_ setTaxiAmount:[taxiAmount integerValue]];
fixed the problem (and cleared the confusion)