Charrua Posted July 21, 2017 Share Posted July 21, 2017 Hi I have some widgets created and handled on lua scripts Now i need to create some widgets cpp side, and, as far as i know, there is one eventQueue so only one loop to peek events should exists, isn't it? I do that loop, on a lua scrpt and i have exposed a class with tolua with only one method: void ProcessEvent(Event event) and when a piked event.source do not match any widget created by lua scripts then, the ProcessEvent in lua calls it's counterpart ProcessEvent method and pass the event to it. When i push a button created by cpp, then the ProcessEvent method is invoked (that's ok and nice!) but the test if (event.source == myCppCreatedButton) never gets true i can and do use, event.id for example, so not all is wrong.. i guess that perhaps i'm missing something obvious, casting perhaps? any idea? by the way, any idea of doing the same thing better? or I did take a complicated solution being one easier? thanks in advance Juan Quote Paren el mundo!, me quiero bajar. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.