Re: [Vala] Glade3, GtkBuilder and signal handlers



Andre "Osku" Schmidt wrote:
Hello,

i'm a hobby coder having a lot of fun with vala and gtk (except
treeview ;). and i'm now in the process off trying to create something
useful with vala (more on that later).

i was trying to adapt the GladeSample[0] to use Gtk.Builder (as i didn't
found any examples of this), after a (long) while i got something that
didn't give me any compile-time errors... but sadly i lack some general
info about all this, to understand why the signal handler is not found.

so, would be very helpful if someone could kick me in the right
direction. attached is a test case how far i got.

cheers
Andre "Osku" Schmidt

[0] http://live.gnome.org/Vala/GladeSample

ps. my system is ubuntu9.04 64bit, glade3.6.1, valac0.7.2(svn)

I have found the problem:

If you declare a callback method inside a class you have to prefix the
callback method name in Glade with the class name in lower case letters.
So try:

  gtk_builder_sample_on_button1_clicked

instead of

  on_button1_clicked


PS: You don't have to add --Xcc="-Wl,--export-dynamic", since this is
already added by pkg-config for gmodule-2.0 (see
/usr/lib/pkgconfig/gmodule-2.0.pc).


Regards,

Frederik



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