[Solved]Subscribing to Events - Compile Error

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

User avatar
Das Gurke
Not too shy to talk
Not too shy to talk
Posts: 31
Joined: Sat Sep 02, 2006 15:45

[Solved]Subscribing to Events - Compile Error

Postby Das Gurke » Sat Sep 02, 2006 16:35

Uuuh, this seems to be very basic ... But neither the Ogre Tutorial, the CEGUI Tutorial nor the forum search could help me :(

I tried these to versions to subscribe to an event

Code: Select all

   mButtonQuit->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&GsLogin::reactButtonQuit, this));
    //-------------------
   CEGUI::WindowManager& winMgr = CEGUI::WindowManager::getSingleton();
   CEGUI::Window* window = winMgr.getWindow("Root/ButtonQuit");
   window->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&GsLogin::reactButtonQuit, this));
   

The first one I found somewhere searching the forums, the second one is taken from the Ogre CeGUI Tutorials. Sadly, they both give me the following error

Code: Select all

error C2661: 'CEGUI::SubscriberTemplate<Ret,Args>::SubscriberTemplate' : no overloaded function takes 2 arguments
        with
        [
            Ret=bool,
            Args=const CEGUI::EventArgs &
        ]
And as usual, I don't see anything because I have never createad anything template based myself :(

So maybe anyone can point me out?

Some Specs
Visual Studio 8 Express Edition
Ogre 1.22 (Dagon) and the CEGUI Version shipped with that
Anything more you guys need? Just let me know =)
Last edited by Das Gurke on Sat Sep 02, 2006 19:10, edited 1 time in total.

User avatar
Das Gurke
Not too shy to talk
Not too shy to talk
Posts: 31
Joined: Sat Sep 02, 2006 15:45

Postby Das Gurke » Sat Sep 02, 2006 19:09

Dough ... The function to be called was the error :oops: Should have been

Code: Select all

bool GsLogin::reactButtonQuit(const CEGUI::EventArgs& e)
And was

Code: Select all

void GsLogin::reactButtonQuit(const CEGUI::EventArgs& e)


Return to “Help”

Who is online

Users browsing this forum: No registered users and 20 guests