Compile time errors about subscribeEvent[solved]

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

ZhangJiQ
Just popping in
Just popping in
Posts: 2
Joined: Thu Dec 21, 2006 06:56
Contact:

Compile time errors about subscribeEvent[solved]

Postby ZhangJiQ » Thu Dec 21, 2006 17:12

Sorry for my poor English

Here is the code related to the errors

Code: Select all

CEGUI::StaticImage* backGround = static_cast<CEGUI::StaticImage*> (CEGUI::WindowManager::getSingleton().getWindow("Root/background"));
   CEGUI::ImagesetManager::getSingleton().createImagesetFromImageFile("BackgroundImage", "start.jpg");

   backGround->setProperty("FrameEnabled", "false");
   backGround->setProperty("BackgroundEnabled", "false");
   backGround->setProperty("Image", "set:BackgroundImage image:full_image");

   CEGUI::PushButton* btnStart =static_cast<CEGUI::PushButton*>(CEGUI::WindowManager::getSingleton().getWindow("menu/btnStart"));
   CEGUI::PushButton* btnQuit  =static_cast<CEGUI::PushButton*>(CEGUI::WindowManager::getSingleton().getWindow("menu/btnQuit"));
   
   btnStart->subscribeEvent(
      CEGUI::PushButton::EventClicked,
      CEGUI::Event::Subscriber(&IntroState::btnQuitHandler, this));
   btnQuit->subscribeEvent(
      CEGUI::PushButton::EventClicked,
      CEGUI::Event::Subscriber(&IntroState::btnQuitHandler, this));

and here is the error infos.
\my documents\visual studio projects\chinesechess\introstate.cpp(29): error C2661: 'CEGUI::SubscriberTemplate<Ret,Args>::__ctor' : no overloaded function takes 2 arguments
with
[
Ret=bool,
Args=const CEGUI::EventArgs &
]
and
[
Ret=bool,
Args=const CEGUI::EventArgs &
]

I use the version that shiped with OGRE 1.24.

ZhangJiQ
Just popping in
Just popping in
Posts: 2
Joined: Thu Dec 21, 2006 06:56
Contact:

Postby ZhangJiQ » Thu Dec 21, 2006 17:31

some coding mistakes....OK now


Return to “Help”

Who is online

Users browsing this forum: No registered users and 21 guests