Matthew Harris
8/5/2006 1:11:00 PM
Hi, from what I can see, the "`GTK_WIDGET_CAN_DEFAULT (widget)'
failed" part is trying to say that you set "use default" or something
from Glade on a widget that can't default, confusing eh?
As for the "uninitialized constant WikirubyGlade::GTK" error, I'm
guessing that you're using a Custom widget in Glade to create the
GtkMozEmbed widget, and made a type in the creation function label
where it should be Gtk::MozEmbed rather than GTK::MozEmbed (just a
wild guess).
On 8/5/06, momo <ivanrise@gmail.com> wrote:
> hi all,
> i'm starting with ruby and ruby-gnome2, im trying to develop a simple
> aplication with glade and i generate the ruby file using
> ruby-glade-create-template which is included in my linux distro.
>
> the application works fine, but when i launch it i see this error
> message and i dont know what does it mean and how to fix it.
>
> (eval): line 8
> Gtk-CRITICAL **:gtk_widget_grab_default: assertion
> `GTK_WIDGET_CAN_DEFAULT (widget)' failed
>
> When a close the application i have this error too:
>
> wikiruby.rb:200:in `on_quit': uninitialized constant WikirubyGlade::GTK
> (NameError)
>
> And here my ruby code:
>
> require 'libglade2'
> require 'gtkmozembed'
> require 'lib/redcloth'
> require "rexml/document"
> include REXML
>
> class WikirubyGlade
> include GetText
>
> attr :glade
>
> def initialize(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)}
>
> ...
>
>
> if __FILE__ == $0
> # Set values as your own application.
> PROG_PATH = "wikiruby.glade"
> PROG_NAME = "wikiruby"
> Gtk.init
> WikirubyGlade.new(PROG_PATH, nil, PROG_NAME)
> Gtk.main
> end
>
> Any idea on how to fix this?
>
>
>
--
Matt