[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: g_object_new() and g++
- From: "Michal 'Gleba' Ziemski" <gtk roo k pl>
- To: <a immler 12mm de>, <gtk-app-devel-list gnome org>
- Subject: Re: g_object_new() and g++
- Date: Sat, 25 Jan 2003 20:24:50 +0100
----- Original Message -----
From: "Adrian Immler" <a.immler@12mm.de>
To: <gtk-app-devel-list@gnome.org>
Sent: Saturday, January 25, 2003 7:46 PM
Subject: Re: g_object_new() and g++
> i'm sorry for today but one last question:
>
> i have problems with the g_signal_connect() again. the following
error/warning message appears:
>
> In Constructor `browser::browser()`:
> no matches converting function `query` to type `void(*)()`
> candidates are: void browser::query(void*, void*)
>
> i get the same error when using the other g_signal_connect() line
commented out below.
> whats wrong here ?
>
>
>
>
> class browser{
> public:
> browser();
> void query( gpointer nothing, gpointer tse );
> //some more
> };
First of all if you put query as a method in browser its type would actually
be:
void (*)(browser*, gpointer, gpointer) which I belive would mess up a lot of
things.
You should probaby declate it as "friend"
class browser {
...
friend void query(...)
};
then write the code
void query (..)
{
}
and then connect
g_signal_connect(GTK_WIDGET(submit), "clicked", G_CALLBACK(query), NULL );
I hope it would work.
sorry I can't check it for sure right now, but I have an awfull lot of work
pending :(
Good luck!
Michal "Gleba" Ziemski
> void browser::query( gpointer nothing, gpointer tse ){
> //do something
> }
>
> browser::browser(){
> //do something else
> g_signal_connect(GTK_WIDGET(submit), "clicked",
G_CALLBACK(this->browser::query), NULL );
> // g_signal_connect(GTK_WIDGET(submit), "clicked", G_CALLBACK(query),
NULL );
> }
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]