Using subclasses in Gtk::Builder

So it turns out that the following won’t work:

require ‘gtk2’
MyWindow =
builder =
builder << EOI

<?xml version="1.0"?> 250 440 Main EOI builder['main'].show_all Gtk.main

as GLib can’t find MyWindow. Is there a way to have Gtk::Builder load
classes created in Ruby, specifically those that simply sub-class Gtk

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs