Dear all,
I’m new to ruby and even newer to ruby-gnome
I’m currently learning it in hope of creating a
desktop-database-backend application
Curently I have a problem displaying a message dialog
here is my code
can anyone help me?
Thank you
Regards
Hendra
------------------------ rubyfile
#!/usr/bin/env ruby
This file is gererated by glade2ruby 0.1.1
require ‘libglade2’
class Tanya_V
include GetText
attr :glade
PROG_PATH = “tanya.glade”
PROG_NAME = “YOUR_APPLICATION_NAME”
def initialize
call(PROG_PATH, nil, PROG_NAME)
end
def call(path_or_data, root = nil, domain = nil, localedir = nil,
flag = GladeXML::FILE)
bindtextdomain(domain, localedir, nil, “UTF-8”)
@glade = GladeXML.new(path_or_data, root, domain, localedir, flag)
{|handler| method(handler)}
@window1 = @glade.get_widget(“window1”) #GtkWindow
@button1 = @glade.get_widget(“button1”) #GtkButton
@messagedialog1 = @glade.get_widget(“messagedialog1”)
#GtkMessageDialog
@dialog_vbox1 = @glade.get_widget(“dialog_vbox1”) #GtkVBox
@dialog_action_area1 = @glade.get_widget(“dialog_action_area1”)
#GtkHButtonBox
end
def on_button1_clicked() #button1(on_button1_clicked)
#put your code here
??? what should I type here to show the messagedialog?
end
def showWindow1 #procedure to show window1(GtkWindow)
#put your code here
@window1.show
Gtk.main
end
def showMessagedialog1 #procedure to show
messagedialog1(GtkMessageDialog)
#put your code here
@messagedialog1.show
Gtk.main
end
end
test = Tanya_V.new
test.showWindow1