Re: [Vala] Glade3, GtkBuilder and signal handlers



On Mon, 2009-05-04 at 12:37 +0200, Frederik wrote:
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

aah, thanks!

so it seems:
"FooBar" is "foo_bar_"
and "foo_bar" is "foo_bar_"
but what happens with "Foo_Bar" ? ;P
(yes, it seems to follow this logic, it's "foo__bar_")

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).

aah, thanks!

and it seems i don't need that connect_signals method neither (as
opposite to the glade example, where i copied and modified it from),
yuhuu!

now i got a related question (as noob). what is mostly used for own
signal handlers, inside or outside of my class ? i assume (with my
little knowledge) the major difference would be scope-of-variables ?

(i propably just use outside for starters, as then i dont have to write
the class name in the gtkbuilder ui file ;P)

cheers
Andre

ps. and 1000x thanks for the added examples in gnome.org!




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