Nagy József wrote:
I try to subscibe my event handler funtion to cegui with this code:
winMgr->getSingleton().getWindow("Demo7/Window1/Quit")->subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&CEGUITest::CEGUIExit,this));
At this line the application crashes. I use the source of Ceguitest. In
the support forum I finded a way to solve the problem (maybe):
(mouse->GetLastButton(0))
{
using namespace CEGUI;
WindowManager::getSingleton().getWindow("Demo7/Window1/Quit")->
subscribeEvent(PushButton::EventClicked,
Event::Subscriber(&TTViewer::HandleQuit, this));
}
But the CS manual forbids this..
What can I do?
Thanks for any help!
Try the following:
cegui->GetWindowManagerPtr()->getWindow("Demo7/Window1/Quit")->subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&CEGUITest::CEGUIExit,this));
Where cegui is a csRef<iCEGUI>.
Basically, instead of using the CEGUI::*::getSingleton()
functions, use the iCEGUI::Get*Ptr() functions to get a pointer to a singleton.
Seth
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]