Using Classes in GTK+



Hello All.
    I am just new to this mailing list and posted my first message the other day. I was very impressed with the way people were so quick to respond, even though my question could have been easily answered by looking at the GTK Tutorial, (which I did not know about at the time but will reference first from now on before asking) and would like to thank ye for you patients.

So soon after my last request I have another problem.

I have defined a class which has a function change_animate. I created an instance of this class b. I have also created a check box and am trying to invoke the change_animate function when this check box is pressed.

here is the line of code from the program:

gtk_signal_connect_object( GTK_OBJECT( setup_animation ), "clicked",
GTK_SIGNAL_FUNC( b.change_animate ),  NULL  );

When I compile the program I get:

g++ program1.c -Wall -o program1 `gtk-config --libs --cflags`
program1.c: In method `void application::regester_callbacks()':
program1.c:219: warning: converting from `void (battle::*)()' to `void (*)(...)'

Then when I run the program I get:

Segmentation fault (core dumped)

Can anyone help cause I done have a clue. Is it possible to call a class function in such a situtation.

Thankyou.
Ciaran
__________________________________________________________________
Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/




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