Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popups don't display anything #150

Open
Apocryphon opened this issue Jun 27, 2011 · 3 comments
Open

Popups don't display anything #150

Apocryphon opened this issue Jun 27, 2011 · 3 comments

Comments

@Apocryphon
Copy link

For the examples for creating popup windows, creating a popup that displays Google works, but the other ones fail to display anything but a blank popup. Also, there's an example for creating a blog popup entry where only part of the code is given. This is my attempt at it- why doesn't it work?

Popup.make do
h1 "MY BLOG"
list do
blog.each do |entry|
h2.entry.title
p entry.time
p entry.fulltext
end
end
end

@re4ctionary
Copy link

Make Sure that your "ends" are lining up with their corresponding lines in terms of indentation

example

$ represents One spacebar tap

Line 1 (Open)
$$Line 2 (Open)
$$$$Line 3 (Open)
$$$$end (This end lines up with Line 3; therefore closes that line)
$$end (This end lines up with Line 2; therefore closes that line)
end (This end lines up with Line 1; therefore close that line)

(note: 2nd level indentation are 2 spaces; 3rd level indentation are 4 spaces... in so far as this tutorial is concerned)

Note: I don't know if this matters outside the "TryRuby.org" environment- however, that being said, it's good practice; that way it's easy to see when you missed an end (especially when your code gets longer).

Best,
R

@MajorGrooves
Copy link

I thought indentation's only purpose was to make it easier to keep track of code blocks, rather than have any real effect on the code - i.e. it should run the same with or without indentation.

@re4ctionary
Copy link

I'm only addressing the issue as it relates to "TryRuby.org." I don't think it's critical outside of the learning environment- however, if you want to get through the lesson; it may be a convention you need to follow in order to complete the section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants