Re: Binding extra arguments



You would do it thusly:

m_button1.signal_clicked().connect( sigc::bind<Glib::ustring,int>( sigc::mem_fun(*this, &HelloWorld::on_button_clicked), "button 1",2) );

since the sigc::bind template function is overloaded to allow addition of more than one argument.

Bob Caryl


SaiKamesh Rathinasabapathy wrote:
Hi,

I want to bind extra arguments to my signal handler.
I read about "Binding extra arguments"  in "programming with gtkmm"  tutorial.

I found the following example:
m_button1.signal_clicked().connect( sigc::bind<Glib::ustring>( sigc::mem_fun(*this, &HelloWorld::on_button_clicked), "button 1") );
  
In this example only one argument is bound(Glib::ustring). But I want to bind two arguments to my signal handler.(int, and Glib::ustring ).

how to bind two arguments to a signal handler?


_______________________________________________ gtkmm-list mailing list gtkmm-list gnome org http://mail.gnome.org/mailman/listinfo/gtkmm-list

--
Robert L. Caryl Jr.
Fiscal Systems, Inc.
102 Commerce Circle
Madison, AL 35758-2706 USA
256-772-8922 ext. 108

This e-mail message may contain privileged or confidential information. If you are not the intended recipient, 
you may not disclose, use, disseminate, distribute, copy or relay this message or attachment in any way. 
If you received this e-mail message in error, please return by forwarding the message and it's attachment 
to the sender and then delete the message and it's attachment from your computer.

Neither Fiscal Systems, Inc., nor its affiliates, accept any liability for any errors, omissions, corruption 
or viruses in the contents of this message or any attachments that arise as a result of e-mail transmission.




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