Re: [Vala] Generated code, GTK signals and prefixes.
- From: Jan Hudec <bulb ucw cz>
- To: Carlos Eduardo da Fonseca <eduardongu gmail com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] Generated code, GTK signals and prefixes.
- Date: Thu, 11 Feb 2010 22:11:46 +0100
On Wed, Feb 10, 2010 at 23:36:23 -0200, Carlos Eduardo da Fonseca wrote:
Hello everyone,
is there any way to connect signals from a GtkBuilder XML without writing
the "Vala generated function name"?
For example:
namespace MyNamespace {
class MyClass {
static void my_handler(Widget widget) { ... }
}
}
In my GtkBuilder XML I'll have to define:
<signal name="clicked" handler="my_namespace_my_class_my_handler"/>
Isn't any way to avoid this?
Why, yes. Write your own binder for use with Gtk.Builder.connect_signals_full
that understands Vala names and can mangle the names for you. It can also use
custom marshallers if you want to avoid having to specify the
[CCode(instance_pos = -1)] for non-static methods.
--
Jan 'Bulb' Hudec <bulb ucw cz>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]