[Glade-users] Ruby + Glade



Hello,

Glade-3.0.0 and plus don't work for me !

Just an example : I  create just a button and an entry, and I save in 
test , running ruby-glade-create-template  test.glade, > test.rb and 
launch   ruby test.rb  but  no exit to the screen an nothing in the 
console ...
/
 cat test.glade
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<!-- Generated with glade3
    Version: 3.0.0
    Date: Tue Oct 10 09:09:58 2006
    User: faya
    Host: crazy_gentoo
-->
<glade-interface>
  <widget class="GtkWindow" id="window1">
    <child>
      <widget class="GtkVBox" id="vbox1">
        <property name="visible">True</property>
        <child>
          <widget class="GtkEntry" id="entry1">
            <property name="visible">True</property>
          </widget>
        </child>
        <child>
          <widget class="GtkButton" id="button1">
            <property name="visible">True</property>
            <property name="label" translatable="yes">button</property>
            <signal name="clicked" handler="on_button1_yo"/>
          </widget>
          <packing>
            <property name="position">1</property>
          </packing>
        </child>
      </widget>
    </child>
  </widget>
</glade-interface>

/and

/ cat test.rb
#!/usr/bin/env ruby
#
# This file is gererated by ruby-glade-create-template 1.1.4.
#
require 'libglade2'
require 'gtk2'

class TestGlade

  def initialize(file)
    @glade = GladeXML.new(file) {|handler| method(handler)}
   
  end
 
  def on_button1_yo()
    puts "on_button1_yo() is not implemented yet."
  end
end

# Main program
  Gtk.init
  TestGlade.new("test.glade")
  Gtk.main
/


Can you give me a solution or an idea , please ?

note: Glade-2.12.2 work fine
My OS is Gentoo Gnu/Linux


Thanks a lot !


steeve .







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]