Nicolas Rodriguez

Results 138 comments of Nicolas Rodriguez

Hi @jhass! Thanks for your quick answer :) > First of all crystal-gobject rewrites `set_foo` to `foo=`, so you'd be looking for `template=` or `template_from_resource=` here. good to know :+1:...

Ruby implementation : https://github.com/ruby-gnome/ruby-gnome/blob/dde8c4fdabeadc6d9c8e4ca345aace535853deb6/gtk3/lib/gtk3/widget.rb

From Gtk3 doc : (important things are in bold) > To make use of this file in our application, we revisit our GtkApplicationWindow subclass, and call gtk_widget_class_set_template_from_resource() from the **class...

Here some Crystal code : https://github.com/jbox-web/ssh-tunnel.cr To run the app : * `make ssh-tunnel` * `./bin/ssh-tunnel`

I tried your suggestion but it doesn't work so you will have an error on compilation : ```sh In src/ssh-tunnel/ui/windows/application_window.cr:5:14 5 | self.template_from_resource = "/com/jbox-web/ssh-tunnel/ui/application_window.glade" ^--------------------- Error: undefined method 'template_from_resource='...

Does this help https://github.com/ruby-gnome/ruby-gnome/blob/dde8c4fdabeadc6d9c8e4ca345aace535853deb6/gtk3/ext/gtk3/rb-gtk3.c#L577 ? Below you have the call to `initialize_post`.

In Rust : https://github.com/gtk-rs/gtk-rs/blob/8a4c2d25e2cd40a6399e919908cde97ea0e93c1f/glib/src/subclass/mod.rs#L101

Gir-FFI : * https://github.com/mvz/gir_ffi/blob/master/lib/ffi-gobject_introspection/i_object_info.rb * https://github.com/mvz/gir_ffi/blob/master/lib/ffi-gobject_introspection/i_object_info.rb#L118

Hi there! Any news? :smiley:

> It would be interesting to see a corresponding C example. https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/examples/application2/exampleappwin.c