Re: Gio::DBus::Connection::emit_signal issue
- From: Harry van Haaren <harryhaaren gmail com>
- To: Aurimas Černius <aurisc4 gmail com>
- Cc: "gtkmm-list gnome org" <gtkmm-list gnome org>
- Subject: Re: Gio::DBus::Connection::emit_signal issue
- Date: Sun, 21 Aug 2011 22:36:31 +0100
Hi!
connection->emit_signal(OBJECT_PATH, INTERFACE_NAME, "Click");
This is the more "C" style way of connecting GObject signals...
If I replace the line with
g_dbus_connection_emit_signal(connection->gobj(), NULL, OBJECT_PATH,
INTERFACE_NAME, "Click", NULL, NULL);
Here your're using the "C" way of connecting GObject signals but doing it right (the right "C" way that is)
the C++ way of doing it is like so:
objectName.signal_clicked.connect( sigc::mem_fun( instanceToConnectTo, &InstanceClassName::functionName ) );
See
http://developer.gnome.org/gtkmm-tutorial/3.0/chapter-custom-signals.html.en for a good explanation & example code.
Good luck! -Harry
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]