jhass / crystal-gobject

gobject-introspection for Crystal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: no overload matches 'Gtk::Builder#connect_signals' with type Nil

gummybears opened this issue · comments

Hi,

When I use version 0.8.0 I am getting the following error

Showing last frame. Use --error-trace for full trace.

In lib/gobject/src/gtk/gtk.cr:18:7

 18 | connect_signals nil
      ^--------------
Error: no overload matches 'Gtk::Builder#connect_signals' with type Nil

Overloads are:
 - Gtk::Builder#connect_signals(user_data : ::Pointer(Void))
 - Gtk::Builder#connect_signals()

This error does not occur when I use branch v0.3.1

dependencies:
  gobject:
    github: jhass/crystal-gobject
    branch: v0.3.1

Just use connect_signals without parameters, when you see user_data in C documentation, ignore it, the user data is used internally by the binding... and is really not needed on Crystal where you can use closures to pass access "external" data inside a signal callback.