I have a serious problem with the events in CEGUI ... it is no problem to register new handlers for events but i can't unsubscribe them ... I tried everything and searched the whole forum but I didn't find a solution ...
Here's a the piece of code I use .. don't worry, this code is only for testing ...
Code: Select all
// The eventName is always "MouseClick"
void thorGuiObject::SubscribeEvent( const char* eventName, const luabind::adl::object& luaFunc )
connection = _targetWindow->subscribeEvent( eventName, CEGUI::Event::Subscriber( &thorGuiObject::HandleEvent, this )).get();
LogManager::getSingleton().logMessage( "Subscribe" );
void thorGuiObject::UnsubscribeEvent( const char* eventName )
LogManager::getSingleton().logMessage( "Unsubscribe" );
bool thorGuiObject::HandleEvent( const CEGUI::EventArgs& e )
LogManager::getSingleton().logMessage( "Event handled" );
UnsubscribeEvent( "MouseClick" );
Everytime I want to unsubscribe I get an error message like this:
I don't know what to ... what am i doing wrong?? Please help me...
C YA - Nuker