domgetter / dare

Ruby Web Game library on top of Opal
MIT License
122 stars 5 forks source link

caption breaks app #8

Closed brandondrew closed 9 years ago

brandondrew commented 9 years ago

If I try to set a caption (or title) the app breaks, giving me only a box with a border

  def initialize
    super width: 640, height: 480, border: true
    self.title = "Pong"  # FAIL! THIS BREAKS THE WHOLE APP!
    @x = 0
  end
domgetter commented 9 years ago

I can't seem to reproduce the behavior. What OS/browser are you using? Also, is there any odd output in the javascript console?

Also, could you copy in your complete ruby file that has the game code?

Thanks for bringing this up!

brandondrew commented 9 years ago

I found the problem. I copied the entirety of the Ruby into a new app, and the problem went away, so I started looking outside of the .rb file and find that I had inadvertently made a change to the HTML, messing up the id in this line:

<title id="pageTitle"></title>

Since the problem only appeared when I used self.title I mistook that as the source of the problem. Sorry.