I am just curious about the role that self plays within an object. I understand that writing [[self dataForTable] count]
refers directly to the iVar contained in that object. But if you miss self off and directly specify the iVar [dataTable count]
how does that differ, what are you protecting against by using self, is it just to uniquely specify an iVar rather than maybe some similar local variable?
@implementation ViewController
@synthesize dataForTable;
...
NSUInteger dataCount = [[self dataForTable] count];
much appreciated
Gary.