Order of events? Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
User avatar
jellyfish
Knows some wx things
Knows some wx things
Posts: 44
Joined: Mon Oct 26, 2009 2:52 pm

Order of events?

Post by jellyfish »

Hi there,

I hope you don't mind me asking a question every day. ^^

As I've read in another thread, there is only one event handled at the time.
But where is decided in which order the events are handled, if an interaction triggers more than one?

(In my case, EVT_BUTTON and EVT_KILL_FOCUS - I want the button event to be handled first.)

Regards,
jellyfish
Frank
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 211
Joined: Sat Jan 01, 2005 6:19 pm

Post by Frank »

As far as I understand it, wx just translates the events from the system (like WM_COMMAND, WM_FOCUS on Windows) into wxEvents (wxCommandEvent, wxFocusEvent).

This means, the order of the events is platform dependent.
User avatar
jellyfish
Knows some wx things
Knows some wx things
Posts: 44
Joined: Mon Oct 26, 2009 2:52 pm

Post by jellyfish »

...hmh, not so good news. Thank you very much, however.

So maybe the KILL_FOCUS event wasn't the best choice for my problem. I guess there is no such thing as waiting in an event handler for another event?

Regards,
jellyfish

Edit: I've found wxApp::FilterEvent and wxApp::Pending ... is there anywhere an example how to use wxApp outside OnInit()?
wxuserbrest
In need of some credit
In need of some credit
Posts: 2
Joined: Mon Feb 26, 2007 4:33 pm

Why not doing a Finite State Machine

Post by wxuserbrest »

Hello,
do a FSM and you will do the behaviour of your system, and you will change state on event receptions.
Sincerely
Post Reply