Name of events

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

vr
Just popping in
Just popping in
Posts: 19
Joined: Thu Oct 12, 2006 20:57

Name of events

Postby vr » Tue Nov 28, 2006 13:57

Is there a simple way of getting the available Events for a specified Window?

I have for example a Radiobutton, in the API documentation is has a method named EventSelectStateChanged" and onSelectStateChanged

None works with w:subscribeEvent("EventSelectStateChanged", "setupWorldEnableCallback")

or w:subscribeEvent("onSelectStateChanged", "setupWorldEnableCallback")

and finally SelectStateChanged.
None of the above works.

I can get a slider to work, and ordinary button (with Clicked) but not this Radiobutton, it just doesnt respond...

Any hints?

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Tue Nov 28, 2006 14:14

Taken from Formatted Numeric Data:

radiobutton->subscribeEvent(RadioButton::EventSelectStateChanged, Event::Subscriber(&DemoSample::onCurrencySelected, this));

where DemoSample is the name of a class. The function called is defined as follows:

bool DemoSample::onCurrencySelected(const CEGUI::EventArgs& e)
{
return true;
}

You are better off using the Cegui constants rather than using literal strings.

vr
Just popping in
Just popping in
Posts: 19
Joined: Thu Oct 12, 2006 20:57

Postby vr » Tue Nov 28, 2006 14:27

MM, assuming you are working in C++, which I am not. Im using CEGUI using lua.


Im sorry I didnt explicitly say that.. (could have been derived from my code examples though).

So the problem is still....a problem.

Where can I find the exported Event names, and why couldnt one throw an exception upon specifying an unexisting events?


Return to “Help”

Who is online

Users browsing this forum: No registered users and 30 guests