Re: g_object_new() and g++

----- 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{
  void query( gpointer nothing, gpointer tse );
 //some more

First of all if you put query as a method in browser its type would actually
void (*)(browser*, gpointer, gpointer) which I belive would mess up a lot of
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

  //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),
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org

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