Just started on CEGUI, and am so far very impressed.. it looks like it should save me a lot of time!
Have a small problem though that has been bugging me for the past couple of hours. Have read as many related topics on this forum about it as I can, and have tried many solution but nothing has worked so far.
The problem is that my App crashes with an 'Illegal Operation' style error. When I run the debugger, it says 'Access violation reading location 0x00000008'. Now, I'm pretty sure this error stems from the Event Subscriber function.. here's my code:
Code: Select all
WindowManager& winMgr = WindowManager::getSingleton();
Window* window = winMgr.getWindow("testWindow/Controls/Add");
window->subscribeEvent(PushButton::EventClicked, Event::Subscriber(&GUI::handleButton, this));
bool GUI::handleButton(const CEGUI::EventArgs& e) {
// Do stuff here
return true;
}
As can be seen, its all pretty normal looking (I think), however, if I comment the line beginning 'window->subscriber...' out, the App doesn't crash

Other notes on my situation are as follows:
I'm using Visual C++ 6.0 'cos Visual Studio 2003 keeps screwing stuff up, however, I'm currently using the RELEASE CEGUIBase.dll for the VS2003 build. This is because all other builds (CEGUIBase_d.dll and CEGUIBase.dll from the VS6.0) give 'Procedure Entry Point could not be located in x.dll' errors, even when I compile my own .dll

Anyway, any help would be greatly appreciated.
Thanks.