Re: Connecting to a signal given as a string



You can not do it with a nonstatic member function because the this
pointer is always implied with a static mem. fun. (which you most
likely know, just repeating it for all); there's no way to directly
connect C GSignals in a C++ object to a nonstatic member function.

On Sat, Oct 25, 2008 at 9:01 PM, Søren Hauberg <hauberg gmail com> wrote:
> Hi All,
>  I'm trying to use the webkitgtk library inside my gtkmm app. I can
> get basic functionaliy simply by
>
>    GtkWidget *html_widget = webkit_web_view_new ();
>    Gtk::Widget *html_widget_mm = Glib::wrap (html_widget);
>
> after which I can add 'html_widget_mm' to any Gtk::Widget. When I have
> to work with webkit I simply use the C interface, and that works fine
> for everything but for connecting signals. If I want to connect a
> signal in a C app then I can do something like
>
>    g_signal_connect (G_OBJECT (html_widget), "signal::load_finished",
> G_CALLBACK (some_function), some_data);
>
> However, this is giving me problems in C++, as I would like to connect
> a non-static member function to this signal. So, I was wondering can I
> somehow connect to this signal through my 'html_widget_mm' variable
> which is of type Gtk::Widget ?
>
> Søren
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>



-- 
Please note that according to the German law on data retention,
information on every electronic information exchange with me is
retained for a period of six months.
[Bitte beachten Sie, dass dem Gesetz zur Vorratsdatenspeicherung zufolge
jeder elektronische Kontakt mit mir sechs Monate lang gespeichert wird.]


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