Xcode 4 and wrong "Semantic Issues" - How to deal with them?
I've started using Xcode 4, and I'm really annoyed by some of the "features" especially those semantic warnings which don't seem to be making much sense, for example:
http://coding-journal.com/wp-content/uploads/2011/08/Screen-Shot-2011-08-07-at-8.50.46-PM.png
On line 640, you can see a semantic issue saying that I am passing an incompatible pointer type to a parameter of NSString 开发者_Python百科*
, which is just plain wrong because the signature of NSTabViewItems' initWithIdentifier:
is:
- (id)initWithIdentifier:(id)identifier
My guess is that Xcode thinks that I am calling initWithIdentifer:
on some other object, because when I Cmd+Click
the method, it gives me three options:
http://coding-journal.com/wp-content/uploads/2011/08/Screen-Shot-2011-08-07-at-8.50.24-PM.png
And the first one, from NSTableColumn, has the signature
- (id)initWithIdentifier:(NSString *)identifier;
So my question is, what do I do in this situation? I like my code warning-free, but this doesn't seem to be possible when using Xcode 4 :(
精彩评论