I posted this question in the wrong forum at one point, so you may have seen it briefly, but here it is again.
I am upgrading my application to use the new event subscription technique...I have been holding off doing it for a while but Ive heard that the new way yields better performance. It's all going well, but I have a few lines that I cant get to compile anymore, and these concern the passing of some extra parameters to my method which handles the event.
So, for example, I used to use this line of code which subscribed an event and in addition passed the String "Basic" through to my handlePanelShown method:
Code: Select all
myPanel->subscribeEvent( StaticText::EventShown,boost::bind(&MyWindow::handlePanelShown, this, _1, "Basic") );
The new way which does away with boost and uses the Subscriber probably should look something like this:
Code: Select all
myPanel->subscribeEvent( StaticText::EventShown,Event::Subscriber(&MyWindow::handlePanelShown, this, "Basic") );
except this no longer compiles. The error says I am passing the wrong number of arguments, but my handlePanelShown method has not changed.
Any ideas what I might be doing wrong?