Also, are you using version 0.4.1 of cegui? I've found that with 0.4.0
I get a segfault when I try to subscribe to mouse events. The issue
goes away completely with cegui 0.4.1 installed. I should go back,
reproduce the bug, and ask the CS developers to make 0.4.0 as 'too
old'.

--Chris

On 2/15/06, Seth Yastrov <[EMAIL PROTECTED]> wrote:
> 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]
>


--
Christopher S. Case
SUNY Fredonia
Computer Science / Computer Engineering
[EMAIL PROTECTED]
(716) 785 - 5553(Cellphone)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human. To forgive, divine.
To fix mistakes, now that's an Engineer."
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


-------------------------------------------------------
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&kid3432&bid#0486&dat1642
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]

Reply via email to