Event handler failure.

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
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Event handler failure.

Post by ONEEYEMAN »

Hi All,
I'm using custom event in my program.
In the event handler there is a possibility of failure in which case I just return.
After that the sender shou follow different path than when the handler succeeds.
What the best way to check - set something in the event handler as I don't think I have access to the internal "processes" variable.
Or is there a better way?

Thank you.
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Event handler failure.

Post by doublemax »

If you don't send the event from a secondary thread, you can use ProcessEvent() instead of PostEvent() or QueueEvent() and check the return value of that function. It returns true if the event was handled. But if you call event.Skip() in the event handler, it will return false.
Use the source, Luke!
Post Reply