On Tue, Dec 1, 2009 at 10:15 AM, hadass yaari <[email protected]> wrote: > hello, > I'm trying to use boost::bind to solve my problem. I did it like this: > > pb->clicked().connect(SLOT( > > this, (boost::bind<void>(&AddPersonAuto::bla,5))));
Try this? I am not sure it will work considering the very weird way Wt handles the connect function (*WAY* too over-engineered). pb->clicked().connect(this, (boost::bind(&AddPersonAuto::bla,_1,5))); And I honestly have no clue why Wt uses that nasty, useless SLOT macro either, you *should* just be able to do this since connect just need a nullary function to call, who cares if it is a function pointer, a functor, or any callable, it should just simplify things and just take a Boost.Function, which can accept and use it all (and which it so happens that the under-the-scenes Boost.Signals happens to take, thus Wt is creating some Binds when it is not necessary (wasting time and memory), and just making things all around more difficult then just taking a simple TR1/Boost.Function). pb->clicked().connect(boost::bind(&AddPersonAuto::bla,this,5)); > the error that I get is: > > error C2660: 'Wt::EventSignal<E>::connect' : function does not take 2 > arguments > > As you can see connect gets just just one argument - SLOT > when I use a zero parameters I do it like this: > > pb->clicked().connect(SLOT( > > this, AddPersonAuto::onSubmit)); > isn't it the same? > I'll be happy to hear the solution. > Hadas > > On Mon, Nov 30, 2009 at 7:52 PM, hadass yaari <[email protected]> wrote: >> >> Hello everybody, >> I want to be able to pass parameters to the method that the >> WText->clicked().connect method gets. >> In all of the examples I saw that just a method with 0 parameters is used >> but I read in the references that there are signals that gets arguments (up >> to 6). I tried to call them but didn't succeeded. >> How can I do that? >> Maybe I need to connect another signal and not the built in? If so - how >> can I connect it the mouse click on the text? >> Thank you, >> Hadas > > ------------------------------------------------------------------------------ > Join us December 9, 2009 for the Red Hat Virtual Experience, > a free event focused on virtualization and cloud computing. > Attend in-depth sessions from your desk. Your couch. Anywhere. > http://p.sf.net/sfu/redhat-sfdev2dev > _______________________________________________ > witty-interest mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/witty-interest > > ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
