[wx-dev] [ wxwindows-Bugs-1933147 ] Command Event sent twice
SourceForge.net
noreply at sourceforge.net
Tue Apr 22 11:56:23 PDT 2008
Bugs item #1933147, was opened at 2008-04-03 09:43
Message generated for change (Comment added) made by roebling
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1933147&group_id=9863
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Benjamin I. Williams (biwillia76)
Assigned to: Nobody/Anonymous (nobody)
Summary: Command Event sent twice
Initial Comment:
Hi,
I noticed the following new behavior recently and wanted to check if this is or isn't a bug. This behavior can be found in the 2.8 branch. I haven't yet tested it with trunk.
I had a spurious evt.Skip() in a command handler. For a long time, wxWidgets 2.8.7 included, the command was only fired once. With the Skip(), now the command is fired twice. Here's a sample of what I'm talking about.
void OnOpenURL(wxCommandEvent& evt)
{
wxMessageBox(wxT("Command Clicked"));
evt.Skip();
}
The message box will appear twice.
I've attached a full sample which demonstrates this problem.
All the best,
Ben
----------------------------------------------------------------------
>Comment By: Robert Roebling (roebling)
Date: 2008-04-22 18:56
Message:
Logged In: YES
user_id=77100
Originator: NO
Sending out the event twice is clearly a bug. Simply generating a
backtrace when the event is fired the second time should reveal where it
comes from and probably also explain why.
----------------------------------------------------------------------
Comment By: AYF (az911)
Date: 2008-04-03 10:00
Message:
Logged In: YES
user_id=1495376
Originator: NO
This looks like my post here:
https://sourceforge.net/tracker/index.php?func=detail&aid=1929968&group_id=9863&atid=109863
I didn't think to check all command events, but
wxEVT_COMMAND_MENU_SELECTED fires twice if skipped. And I have tested this
with the trunk on wxMSW.
----------------------------------------------------------------------
Comment By: Stefan Csomor (csomor)
Date: 2008-04-03 09:54
Message:
Logged In: YES
user_id=81467
Originator: NO
Hi Ben
at least on mac this is the behavior because events get re-emitted by the
OS at different levels if the event has not been handled, and the
notHandledErr corresponds to calling evt.Skip()
Best,
Stefan
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1933147&group_id=9863
More information about the wx-dev
mailing list