oprypin / crsfml

Crystal bindings to SFML multimedia/game library

Home Page:https://oprypin.github.io/crsfml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

undefined method 'cast' for UInt64:Class

g33kidd opened this issue · comments

commented

Is this a Crystal issue or crsfml issue?
Seems to be a type casting problem.

I can reproduce it by running a basic window and trying to draw a triangle using the CircleShape class. Seems to produce the same error message each time. http://d.pr/i/1exJ5

window = SF::RenderWindow.new(SF.video_mode(600, 600), "Triangle Test")
while window.open?
  while event = window.poll_event
    if event.type == SF::Event::Closed
      window.close
    elsif event.type == SF::Event::Resized
      # adjust the viewport when the window is resized.
      GL.viewport(0, 0, event.size.width, event.size.height)
    end
  end

  window.clear SF::Color::Black

  triangle = SF::CircleShape.new(80, 3)
  triangle.fill_color = SF::Color::Red
  window.draw(triangle)

  window.display
end

See
https://github.com/manastech/crystal/blob/master/CHANGELOG.md#080-2015-09-19
af86723#diff-dfbef1ed1f896d632e43d61c2e2ce2e8R422
cast -> new

Does Shards only install releases? I should've made a new one anyway. And it's done.