Pointer and signals



Hi,

I have following question, I usually create an object like this : 
button_filechooser = manage( new Gtk::Button(Gtk::Stock::OPEN));

but then I get an error on connecting a handler (that it is of non-class
gtk::button)

button_filechooser.signal_clicked().connect( sigc::mem_fun( *this,
&Dialog_Make_Image::on_button_filechooser_clicked) );
	
I've tried the same with initialising the object like this :
Gtk:Button button_filechooser(Gtk::Stock::OPEN)
Then it works !

So I guessed it is an issue with pointers, and I tried with a pointer
again with :
*button_filechooser.signal_clicked().connect( sigc::mem_fun( *this,
&Dialog_Make_Image::on_button_filechooser_clicked) );

Doesn't work !? Why ?
How can I work with a pointer, and succed connecting a handler ?






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