whoops, sorry about the typos. any A:: here is really View::
--- In Boost-Users@y..., "khuroth"
I have a View class that has some widgets, and a Controller class that controls the view, so the View class has a GetController() member function that returns a reference to its controller. When the View's constructor is called, GetController() would return a bad ref, but it would return a valid reference by the time a button is clicked... so what I'm trying to do is, inside the View constructor:
my_button.on_click = bind( (_1 ->* &A::GetController).DoSomething (), this );
but that obviously doesn't work... I'm even having trouble just saving the first part:
my_button.on_click = bind
(_1 ->* &A::GetController, this); also doesn't work... I tried defining the on_click member of the button as a boost::function<void> or a boost::function0<void> in the first example, and a boost::function
or boost::function0 in the second snip... I get immense compiler errors, so I'm not sure where I messed up. What am I doing wrong?