[SOLVED] eventMouseSetFocus problem

Buckcherry

16-01-2009 16:59:34

Hello,

I am trying to detect when I click over a Edit widget and when I don't, for that, I am doing the following:

mChatEdit->eventMouseSetFocus = MyGUI::newDelegate(this, &WorldState::handleEditChatSetFocus);
mChatEdit->eventMouseLostFocus = MyGUI::newDelegate(this, &WorldState::handleEditChatLostFocus);


But I get a lot of errors. Using the eventMouseButtonClick method instead, it compiles successfully.

Any idea about how to use the eventMouseSetFocus, please?.

Five_stars

16-01-2009 17:21:37

I think this is an error in your WorldState::handleEditChatSetFocus and WorldState::handleEditChatLostFocus methods signature
In my (last SVN revision) version it is void method(MyGUI::WidgetPtr _sender, MyGUI::WidgetPtr _old) . Check it.

For example, definition of handleEditChatSetFocus
void WorldState::handleEditChatSetFocus(MyGUI::WidgetPtr _sender, MyGUI::WidgetPtr _old){...}

Buckcherry

17-01-2009 11:04:24

Defining the methods like this solved my problem:

WorldState::handleEditChatSetFocus(MyGUI::WidgetPtr _sender, MyGUI::WidgetPtr _old)
WorldState::handleEditChatLostFocus(MyGUI::WidgetPtr _sender, MyGUI::WidgetPtr _old)


Thanks!
:)