Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

grimreaper1377

macrumors regular
Original poster
Oct 20, 2007
218
0
Hi,

I'm working my way though the 3rd edition of Hillegass' book and I'm on chapter 9 where he talks about adding undo to the raiseman application. However, I'm confused about the examples he gives for kvc conventions. For example,

Code:
id arrayProxy = [playlist mutableArrayValueForKey:@"songs"];

int x = [arrayProxy count]; // is the same as
int x = [playlist countOfSongs]; // if countOfSongs exists

id y = [arrayProxy objectAtIndex:5] // is the same as
id y = [playlist objectInSongsAtIndex:5]; // if the method exists

[arrayProxy insertObject:p atIndex:4] // is the same as
[playlist insertObject:p inSongsAtIndex:4]; // if the method exists

[arrayProxy removeObjectAtIndex:3] // is the same as
[playlist removeObjectFromSongsAtIndex:3] // if the method exists

Are these conventions in apple's documentation?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.