gtkmm signal/connect bug? insert_connection() in user class necessary?



Hi,

while compiling a really simple program with gtkmm signals (current CVS
and older versions checked) I ran into the strange requirement to have
insert_connection in each class connecting to signals.

This can't be right!

What and where's wrong?

  Christof
/*
g++ -g -Wall -DBE_CAREFUL -DDEBUG -I. -I/usr/development/lib/Gtk--/include -I/usr/X11R6/include -I/usr/development/lib/glib/include -I/usr/development/include   -c sigtest.cc -o sigtest.o
/usr/development/include/gtk--sigcpp.h: In function `class Connection connect_to_method<y, y, long int>(class Signal1<long int> &, class y *, void (y::*)(long int))':
sigtest.cc:13:   instantiated from here
/usr/development/include/gtk--sigcpp.h:481: no matching function for call to `y::insert_connection (Connection_impl *&)'
make: *** [sigtest.o] Error 1
*/

#include <gtk--sigcpp.h>

class x 
{public: 
   Signal1<long> test;
};

class y
{  x x_inst;
 public:
   void function(long y);
   y()
   {  connect_to_method(x_inst.test,this,&function);
   }
};



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