hedron-crystal / hedron

An extendable UI library in Crystal, with markup capabilities.
MIT License
85 stars 5 forks source link

`on_change=` cannot have a block #4

Closed anicholson closed 6 years ago

anicholson commented 6 years ago

Hi :wave: ,

Thanks for putting the effort into such a neat library!

None of the examples are currently building on 0.26.0, due to this compile error:

crystal ml_gallery.cr 
Error in ml_gallery.cr:1: while requiring "./ml_gallery/ml_gallery.cr"

require "./ml_gallery/ml_gallery.cr"
^

in ml_gallery/ml_gallery.cr:1: while requiring "../../src/hedron.cr"

require "../../src/hedron.cr"
^

in /home/andy/scratch/hedron/src/hedron.cr:2: while requiring "./hedron/hdml/*"

require "./hedron/hdml/*"
^

in /home/andy/scratch/hedron/src/hedron/hdml/hdml.cr:2: while requiring "./parser.cr"

require "./parser.cr"
^

in /home/andy/scratch/hedron/src/hedron/hdml/parser.cr:1: while requiring "../ui/*"

require "../ui/*"
^

Syntax error in /home/andy/scratch/hedron/src/hedron/ui/font_button.cr:26: setter method 'on_change=' cannot have a block

    def on_change=(&block : FontButton ->)
                                          ^
FireG3cko commented 6 years ago

commenting out # def on_change=(&block : FontButton ->) # self.on_change = block # end from src/hedron/ui/font_button.cr allows compilation, but I'm not really sure that's a long-term solution.

hanyuone commented 6 years ago

I fixed it in a recent commit, I haven't pushed it yet. Will do so tonight.

hanyuone commented 6 years ago

Fixed.