[DERPED] MyGUI 3.2.0 Button events firing twice


25-02-2012 11:24:34

EDIT: Never mind, I discovered that I had a class I made way back at the start of the project that was also injecting events into the GUI, so I was doing it twice. Strange that the old class escaped all the deprecated warnings...

I just updated to MyGUI v3.2.0, and have successfully gotten rid of all the deprecation warnings.
Now, I launch my application to make sure my GUI still works, and I have come across some problems.
1) My buttons seem to be firing their delegates twice. (Which might explain issue 2)
2) My MenuBar doesn't work the way it used to. I click on the first option, and no submenu appears like it used to.

The menu is not that important, but the buttons firing twice is a problem.
To test this, I generated a new layout file in the Layout editor:
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout" version="3.2.0">
<Widget type="Widget" skin="PanelSkin" position="260 395 245 110">
<Widget type="Button" skin="Button" position="20 20 145 30" name="btn_test">
<Property key="Caption" value="Test"/>

I gave it a delegate like this:

_gui->findWidget<MyGUI::Button>("btn_test")->eventMouseButtonClick += MyGUI::newDelegate(this, &Screen::GUI_test);

void Screen::GUI_test(MyGUI::Widget* _sender)
cout << "TEST" << endl;
I gave it a delegate like this: I gave it a delegate like this:

My result was that TEST was printed twice when I clicked the button. I tried using 'eventMouseButtonPressed' as well, and got the same result.
I tried with injecting the mouse event into MyGUI and without, and got the same result both times.

Is there something I should be looking for elsewhere that is causing this? Or am I not doing something important?
I have a lot more GUI to go through, and some of it relies on buttons firing their events once only.

Any and all help would be appreciated.