Re: need your help for Gtk3 and Moose
[email protected] (tsuyoshi okita) Wed, 14 May 2014 07:38:31 +0900
| Newsgroups | perl.moose |
|---|---|
| Message-ID | <[email protected]> |
Dear Shlomi-san, Thank you for your super quick reply. I just patched your diff code, and it sure works!!!!:->>>> I was thinking isa was mandatory. dahhhh!!! Thank you mucho mucho much!! one more thing, after patched, it worked but gave me this warning: #----------------- GLib-GObject-CRITICAL **: g_value_type_compatible: assertion `G_TYPE_IS_VALUE (src_type)' failed at /usr/lib/perl5/Glib/Object/Introspection.pm line 57. (gtk3_moose_with_builder.pl:24496): Gtk-WARNING **: /build/gtk+3.0-Pql4wP/gtk+3.0-3.4.2/./gtk/gtkliststore.c:851: Unable to convert from (null) to gchararray GLib-GObject-CRITICAL **: g_value_unset: assertion `G_IS_VALUE (value)' failed at /usr/lib/perl5/Glib/Object/Introspection.pm line 57. #----------------- did you get this message when you executed the code? Thank you. tsuyoshi On 2014年05月13日 15:41, Shlomi Fish wrote: > Hi Tsuyoshi, > > On Tue, 13 May 2014 15:02:18 +0900 > tsuyoshi okita <[email protected]> wrote: > >> Dear, >> >> I am a newbie to Moose. >> I have been trying to use Moose for Gtk3, and I do not think Moose is >> happy with Builder. >> After Moose load ui file, has 'root_window' tries to get main_window >> object, and it seems this is where the problem gets generated. >> > I've attached a patch to fix the problem. With it, the program runs fine her. > Note that I removed some isa => ... specifiers because I thought they were the > problem, but I don't think they were necessary. The main change was adding > sanity checks (Which are also not necessary) and converting an attribute to > "lazy => 1" so it will be initialised in the right time. > > Hope it works fine for you. > > Regards, > > Shlomi Fish >