I'm getting this warning when I'm calling a local routine.
My code is this:
-(void)nextLetter {
// NSLog(@"%s", __FUNCTION__);
currentLetter ++;
if(currentLetter > (letters.count - 1))
{
currentLetter = 0;
}
self.fetchLetter;
}
I'm getting the warning on the self.fetchLetter statement.
That routine looks like this:
- (void)fetchLetter {
// NSLog(@"%s", __FUNCTION__);
NSString *wantedLetter = [[letters objectAtIndex: currentLetter] objectForKey: @"langLetter"];
NSString *wantedUpperCase = [[letters objectAtIndex: currentLetter] objectForKey: @"upperCase"];
.....
}
I prefer to fix warning messages, is there a better way to write this?
Thanks!
The dot notation (i.e. self.fetchLetter
) is meant for properties, not for arbitrary methods. The self.fetchLetter
is being interpreted as "get the 'fetchLetter' property of 'self'," which isn't what you intend.
Just use [self fetchLetter]
instead.