Console Output when adding object to List


Hi Guys,
I am stucked at Fig 2.15 output

My output screen shows the address of each list item (items)

2012-04-29 16:18:52.525 RandomPossessions[82856:403] <BNRItem: 0x7fd9ca417310>
2012-04-29 16:18:52.528 RandomPossessions[82856:403] <BNRItem: 0x7fd9ca418230>
2012-04-29 16:18:52.530 RandomPossessions[82856:403] <BNRItem: 0x7fd9ca4183e0>
2012-04-29 16:18:52.531 RandomPossessions[82856:403] <BNRItem: 0x7fd9ca4184f0>
2012-04-29 16:18:52.533 RandomPossessions[82856:403] <BNRItem: 0x7fd9ca4185e0>
2012-04-29 16:18:52.534 RandomPossessions[82856:403] <BNRItem: 0x7fd9ca4186f0>
2012-04-29 16:18:52.535 RandomPossessions[82856:403] <BNRItem: 0x7fd9ca4187a0>
2012-04-29 16:18:52.536 RandomPossessions[82856:403] <BNRItem: 0x7fd9ca418890>
2012-04-29 16:18:52.537 RandomPossessions[82856:403] <BNRItem: 0x7fd9ca418980>
2012-04-29 16:18:52.538 RandomPossessions[82856:403] <BNRItem: 0x7fd9ca418a50>

but when I debug using NSLog

for(int i=0;i<10;i++)
BNRItem *p = [BNRItem randomItem];
NSlog(@"%@ %d",[p itemName],[p valueInDollars]); //this line shows like Fluffy, 25
[items addObject:p];

but when I do NSLog in loop
NSLog(@"%@",[items objectAtIndex:i]);

it shows items address values??

How are you guys seeing the same output as that in Fig 2.15



Check your -description method in BNRItem. Make sure it is spelled correctly.