Re: [Vala] connecting signals from GtkBuilder
- From: Luca Bruno <lethalman88 gmail com>
- To: "D.H. Bahr" <dbahr uci cu>
- Cc: Vala list <vala-list gnome org>
- Subject: Re: [Vala] connecting signals from GtkBuilder
- Date: Thu, 24 May 2012 21:09:06 +0200
On Thu, May 24, 2012 at 7:33 PM, D.H. Bahr <dbahr uci cu> wrote:
Hello everyone!
I have an issue while trying to connect the signals from GtkBuilder
object to my class' methods.
This is roughly me code structure:
//No namespace specified
class MyClass {
...
public MyClass () {
builder = new Builder();
builder.add_objects_from_file(builder_file, {"main_window"});
...
builder.connect_signals(this);
}
...
public void on_signal_emited (signal signature) {
...
//do stuff
...
}
}
On Glade I connect the signal as follows:
'emit-signal': 'my_class_on_signal_emited'
The code compiles just fine, at runtime I get:
Gtk-WARNING **: Could not find signal handler
'my_class_on_signal_emited'.
How should I name signature handlers on Vala??
Did you follow
https://live.gnome.org/Vala/GTKSample#Loading_User_Interface_from_XML_File ?
--
www.debian.org - The Universal Operating System
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]