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 Swift Collections and Control Flow Control Flow With Loops While and Repeat While

Matthew Lurie
Matthew Lurie
3,512 Points

There is no X next to the Quick Look "eye" in XCode to embed the result?

at 8:12 in the video, there is a "pretty neat" tip to do this. Either I'm crazy or this has been removed. If so, please update the video so others don't have to think they're crazy.

3 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! First, the video is exactly 8:12 seconds long, so I feel like that's not the point in the video you mean. I feel like you might be referring to 2:52 and it may be a misunderstanding of what he said. Here is the relevant quote:

The results area has some pretty neat features by the way, and if you click on the eye symbol by the second line, you can see the final result of x.

He's not saying to click on "x". He's saying that if you click on the "eye" you can see the value of the variable x.

Hope this helps! :sparkles:

Matthew Lurie
Matthew Lurie
3,512 Points

right, sorry I had the wrong time. Any time I ask a question, this site prevents me from seeing what I'm asking about! Hence that confusion.

The sentence AFTER that...he says "You can click the plus sign to embed the result?" Something like that? There is no plus sign. And then he says "And click the X to make it disappear." Not only do I not have that but when I try to click the square block next to the eye (where the + sign is in his video), it's impossible to get rid of it. And if I try to select the code and delete it, Xcode hangs and crashes. What am I not seeing?

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

You're right, there is no plus sign. Also, there's no plus sign in the video. My guess is that there used to be one in Xcode even before they made this video. There is, however a small hollow dot just to the right of the eye and that's what he means. When he hovers over it there briefly appears a + inside the dot. And it's just a toggle He says "And hit plus to get rid of it". He briefly mouses over it and it shows an X. That being said, it doesn't crash my Xcode at all to do that. Are you positive you're running the latest version of macOS and Xcode?

update: Just took a closer look at my Xcode. I use a bit darker theme so it's a bit harder to see and it seems like they removed the brief + and x on mouseover in the new version. That being said, even in the old version it was super fast and is mainly a cosmetic thing.

Matthew Lurie
Matthew Lurie
3,512 Points

Thanks for looking into that - I like these little things included along the way to make us use Xcode more efficiently so it is crazy making when I can't do them!:) I spent like 20min messing around trying to force it to appear. I would update the video so future students don't have the same issue.

Re: the crash - I am on newest Xcode and newest macOS. When I run the code he mentions at 1:46, he says "it's actually going to crash the program." By that point, I'd already copied what he'd written. Then when I go to comment out the print (x), my Xcode hangs with the rainbow wheel. I'm on a 2017 iMac. It would be better if he said, "Don't write this but I'm going to show you something that would crash the program if you wrote it." My two cents. I don't know the slightest thing about Swift so I'm just speaking as an absolute code neanderthal.