When I try to create a callback event for a button, like this:
Code: Select all
newGame->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&BufferedInputHandler::newGame));
I get this compiling error:
Code: Select all
1>------ Build started: Project: herbert_game, Configuration: Debug Win32 ------
1>Compiling...
1>cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
1>herbert_game.cpp
1>c:\ogresdk\include\cegui\ceguifunctorcopyslot.h(51) : error C2064: term does not evaluate to a function taking 1 arguments
1> c:\ogresdk\include\cegui\ceguifunctorcopyslot.h(50) : while compiling class template member function 'bool CEGUI::FunctorCopySlot<T>::operator ()(const CEGUI::EventArgs &)'
1> with
1> [
1> T=bool (__thiscall BufferedInputHandler::* )(void)
1> ]
1> c:\ogresdk\include\cegui\ceguisubscriberslot.h(126) : see reference to class template instantiation 'CEGUI::FunctorCopySlot<T>' being compiled
1> with
1> [
1> T=bool (__thiscall BufferedInputHandler::* )(void)
1> ]
1> c:\documents and settings\simon bakkevig\mine dokumenter\skole\hovedoppgave 08-09\herbert_game\herbert_game\include\framelistener.h(71) : see reference to function template instantiation 'CEGUI::SubscriberSlot::SubscriberSlot<bool(__thiscall BufferedInputHandler::* )(void)>(const T &)' being compiled
1> with
1> [
1> T=bool (__thiscall BufferedInputHandler::* )(void)
1> ]
1>Build log was saved at "file://c:\Documents and Settings\Simon Bakkevig\Mine dokumenter\Skole\Hovedoppgave 08-09\herbert_game\herbert_game\obj\Debug\BuildLog.htm"
1>herbert_game - 1 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
And if I try this:
Code: Select all
newGame->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&BufferedInputHandler::newGame, this));
I get this:
Code: Select all
1>------ Build started: Project: herbert_game, Configuration: Debug Win32 ------
1>Compiling...
1>cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
1>herbert_game.cpp
1>c:\documents and settings\simon bakkevig\mine dokumenter\skole\hovedoppgave 08-09\herbert_game\herbert_game\include\framelistener.h(71) : error C2661: 'CEGUI::SubscriberSlot::SubscriberSlot' : no overloaded function takes 2 arguments
1>Build log was saved at "file://c:\Documents and Settings\Simon Bakkevig\Mine dokumenter\Skole\Hovedoppgave 08-09\herbert_game\herbert_game\obj\Debug\BuildLog.htm"
1>herbert_game - 1 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
If anyone could help me out I would be very grateful.
I'm using VS9.