I have this code:
- (BOOL) validateToolbarItem:(NSToolbarItem *)theItem {
BOOL enable = NO;
if (1 == [theItem tag]) {
enable = YES;
}
return enable;
}
And I get this warning, although the program runs as expected:
Conflicting types for '-(bool)validateToolbarItem:(NSToolbarItem *)theItem'
How can I get rid of this warning? Thanks.
Somewhere else, probably in the header, you have the type for the method declared with
bool(lowercase). You need to make it consistent with the defined method which uses uppercaseBOOL.BOOLis what is commonly used in objective-C.