Possible Duplicate:
Difference between calling self.var vs var
Edit : actually, i did not understand that to add an object to an array does not require a "setter", but actually a "getter", so the use of "self" was not important.
can you tell me why here in this code we use sometimes "self." and sometimes we don't : if we have a "message" to send to the property, we usually use "self.", but here in the locationManager delegate for exemple, we don't use it :
- (void)viewDidLoad {
self.locationMeasurements = [NSMutableArray array];
}
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation {
[locationMeasurements addObject:newLocation];
- (void)viewDidUnload {
locationDetailViewController = nil;
}
- (void)reset {
[self.locationMeasurements removeAllObjects];
}
Thanks for your help
Paul