Hi
is it possible to use a non static member function of a class as an event handler for a control.....
non static member function as an event handler
Moderators: CEGUI MVP, CEGUI Team
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
Re: non static member function as an event handler
Many posts have already been made about this.
You might want to check out this one:
http://www.cegui.org.uk/modules/newbb/v ... 21&forum=2
You might want to check out this one:
http://www.cegui.org.uk/modules/newbb/v ... 21&forum=2
Re: non static member function as an event handler
thats gr8.......thanx
- Coriiander
- Just popping in
- Posts: 1
- Joined: Thu Aug 04, 2005 00:13
Re: non static member function as an event handler
Unfortunately I can't see what's so great about it. My program simply keeps crashing at
mButton->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(HandlerClass::eventHandler, handler));
and yes :p The CEGUI is up and functional, and the mButton is there too.
I *dont* have this problem in Release Mode (VC7.0)
only in Debug Mode...
BEen looking for hours, but just can't find the bug
mButton->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(HandlerClass::eventHandler, handler));
and yes :p The CEGUI is up and functional, and the mButton is there too.
I *dont* have this problem in Release Mode (VC7.0)
only in Debug Mode...
BEen looking for hours, but just can't find the bug
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: non static member function as an event handler
Hi,
It would be helpful if you posted some diagnostic information; stating that te program crashed is a little vague
Check that you're linking your program with the correct runtime; that is 'Multithreaded DLL' for release builds and 'Multithreaded Debug DLL' for debug builds (you basically need to ensure that everything is built using this same configuration, or you will get issues.
If the above is not the problem, you'll need to post some relevant parts of CEGUI.log, the exact exception that's causing the program to crash, and some lines of code to show, in context, what you are doing.
It would be helpful if you posted some diagnostic information; stating that te program crashed is a little vague
Check that you're linking your program with the correct runtime; that is 'Multithreaded DLL' for release builds and 'Multithreaded Debug DLL' for debug builds (you basically need to ensure that everything is built using this same configuration, or you will get issues.
If the above is not the problem, you'll need to post some relevant parts of CEGUI.log, the exact exception that's causing the program to crash, and some lines of code to show, in context, what you are doing.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: non static member function as an event handler
Just wanted to say that i had the same issue with 0.3 and 0.4 CVS !
Compiler : VC 7.1
Freetype : 2.1.10
Xerces : 2.6
Renderer : OpenGL
The problem came from the libs because i used the release CEGUI libs in debug
Compiler : VC 7.1
Freetype : 2.1.10
Xerces : 2.6
Renderer : OpenGL
The problem came from the libs because i used the release CEGUI libs in debug
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 1 guest