Signal with C++
- From: Sergio Kriz <kriizz yahoo com>
- To: gtk-devel-list redhat com
- Subject: Signal with C++
- Date: Mon, 10 Jan 2000 12:19:33 -0800 (PST)
Why this program cause errors at signal connect ?
#include <stdio.h>
#include <gtk/gtk.h>
class CWin
{
public:
Cwin(int *prargc, char *** prargv)
{
gtk_init(prargc, prargv);
Win=gtk_window_new(GTK_WINDOW_TOPLEVEL);
}
~CWin(){}
void Close(GtkWidget *widget,
gpointer client_data)
{
gtk_main_quit();
}
void Show()
{
gtk_widget_show(Win);
gtk_signal_connect(GTK_OBJECT(Win),
"destroy",
GTK_SIGNAL_FUNC(Close),
NULL);
}
void Run()
{
gtk_main();
};
private:
GtkWidget *Win;
};
void main(int argc, char **argv)
{
Cwin *App;
App = new CWin(&argc, &argv);
App->Show();
App->Run();
delete App;
}
cc-1168 CC: ERROR File = teste.C, Line = 33
The indicated type conversion is invalid.
GTK_SIGNAL_FUNC(Close),
^
1 error detected in the compilation of "teste.C".
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]