Re: Writing C++ apps with Gtk?



This is a bit of a guess, but is cbHello an ordinary member function?
If it is then there will be an implicit 'this' parameter passed to it
which gtk+ will not be expecting to pass to it, and things will go
generally pear-shaped.

Try making it a static function.

You'll probably end up writing functions like this:

void TopLevel::static_cbHello( GtkWidget *widget, gpointer data )
{
  ((TopLevel*)data)->cbHello();
}

I seem to remeber doing that a lot when writing stuff for PowerPlant on
the Mac.

Hope this helps

Michael Hudson
Jesus College
Cambridge
mwh21@cam.ac.uk





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