Question

I am trying out the new AppCode 2.0 for Objective-C development.
It shows me a warning in a bubble I don't know from Xcode if I hover the code it indicates as problematic.

How can I copy this message to the clipboard for googling?

Note, that I don't want information about the warning itself, just about how to copy it, so please don't add comments that I should paste some code.


Actually I just found a way: if the bubble shows up, you need to point with the cursor to it, what is quite difficult, as you must enter it through the arrow it points to the problematic code. than you have to point to the beginning of the message by not leaving the text that is printed inside the bubble. by dragging till the second last char you can mark the text and copy it than, while still holding the mouse key down. But if you also try to mark the last char, it will fail.

So the question is now: how to perform the copying of a warning message more easy?


OK, for the more curious among us:

AppCode yields a warning for the line

 self.descriptionLabelSize = [description sizeWithFont:[UIFont fontWithName:@"Helvetica" size:17] constrainedToSize:constraintSize lineBreakMode:UILineBreakModeWordWrap];

it says about UILineBreakModeWordWrap:

Parameter type mismatch: Incompatible enum types 'NSLineBreakMode' and 'anonymous enum'

I am quite sure that we all agree with Xcode that this line is correct. I just want to google for it, and in case i won't find anything, report to the AppCode team.

Was it helpful?

Solution

There is a way to copy the warning message: run the inspections in the batch mode for the current file: Code | Inspect Code and choose the current file scope. Then find your warning in the inspections view below (this one will be under "type checks"). BTW, you shouldn't use "UILineBreakModeWordWrap" - it's deprecated since iOS 6.0 (AppCode should warn you). If you use NSLineBreakByWordWrapping, the warning will go away.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top