Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Build a Simple iPhone App (iOS7) Refactoring into a Model Readonly Attribute

Lex Lawless
Lex Lawless
1,773 Points

THCrystalBall.m when Predictions button is pressed, Breakpoint message

When the Predictions button is pressed, the if (_predictions == nil) { is highlighted and says "Thread 1:breakpoint 2.1.

Anthony Perry
Anthony Perry
2,050 Points

Sounds like you just set a breakpoint, which is the blue arrow on the left side of the document you're editing. If you can't find it I'll post a picture of what it looks like. You can either remove it by dragging it away from its location or you can click it to disable it. You could also click the play button in the bottom of the Xcode window(not the one in the top left corner)

Breakpoints

John Akin
John Akin
2,253 Points

Thanks Anthony. This was my problem. I was about to go crazy analyzing all the code in the videos.

2 Answers

Lex Lawless
Lex Lawless
1,773 Points

I noticed an error message when i drilled into it. It says "Use of undeclared identifier '_predictions'

However, I followed exactly what Amit did in the code and in the .h file, I put

@property (strong, nonatomic) NSArray *predictions;

So I don't know why the program is complaining.

Anthony Perry
Anthony Perry
2,050 Points

What version of Xcode are you using?

Lex Lawless
Lex Lawless
1,773 Points

Ok this is strange, I retyped @property (strong, nonatomic) NSArray *predictions; and then ran the program again, and now the error doesn't appear. The code is exactly the same as before! I don't get it. Must be some bug in Xcode.

Anthony Perry
Anthony Perry
2,050 Points

Haha you'll have that. I often have to clean the build folder, completely quit Xcode, or do as you did and just redo what I know should be working. Xcode can be temperamental. Glad you figured it out though.

Lex Lawless
Lex Lawless
1,773 Points

Thx. These are the undocumented features! :)