After updating to xcode 4.6 and ios6.1, I get this new error "'objectType' used as the name of the previous parameter rather than as part of the selector". I get this multiple times. Any ideas?
PS: The method that it get displayed is a custom one for reverse geocoding.
-(void) getAddress: (NSString *) objectType: (CLLocationCoordinate2D) objectCoordinate
Your method is declaring the selector With spaces,
Note mention .h and .m both are same and equal spaces
When retrive methode, that time careful about method and its arguments. like [self testMethod:4.5(space):TRUE];
It says that
objectType
is the name of theNSString
object in your method and not part of the method name and it should not be used asobjectType: (CLLocationCoordinate2D) objectCoordinate
which normally denotes a part of method name.Ideally you should change,
to a more readable,
The above error can also be fixed by putting a space between
objectType
and next param in method definition(For eg:--(void)getAddress:(NSString *)objectType : (CLLocationCoordinate2D)objectCoordinate
). Note the space afterobjectType
.Update:
To answer the question in comments you can use the below line to suppress these warnings:
Add this in your pch file. I am not sure if this will work for your case where it comes from library but you can try it out. Check this clang-trunk for more details.
It's all about the spacing, darling... as @Martin R said re: this, debateably BETTER question...
Sufficient meaning, here, that Xcode shuts the hell up..
In the spirit of that odd piece of syntatic trivia... here's my favorite Cocoa header file, EVER. and yes, those are all valid method names, hehe.