[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] A no-longer-reproducible anomaly
From: |
Vadim Zeitlin |
Subject: |
Re: [lmi] A no-longer-reproducible anomaly |
Date: |
Sat, 10 Mar 2018 02:23:51 +0100 |
On Sat, 10 Mar 2018 00:42:33 +0000 Greg Chicares <address@hidden> wrote:
GC> I conclude that this issue, described in 'single_choice_popup_menu.hpp':
GC>
GC> /// WX !! Warning: the first character in 'title' (if specified) seems
GC> /// to become an accelerator, interfering with any menuitem that uses
GC> /// the same character as its own accelerator.
GC>
GC> must have been fixed by some wx update (and can therefore now be
GC> removed) based on experimenting with the following throwaway patch.
I don't really remember (and couldn't find by examining "git log
src/msw/menu{,item}.cpp") any relatively recent commits that could have
changed this, but OTOH I don't remember ever seeing this problem neither.
The last potentially relevant commit I found was
a3f4e9e81afa4f435b137ebbfb5b07e98a698271 but it dates from 1999-02-06...
GC> Notably, pressing "T" chooses "Two", not "Test".
GC>
GC>
---------8<--------8<--------8<--------8<--------8<--------8<--------8<-------
GC> diff --git a/skeleton.cpp b/skeleton.cpp
GC> index dc3ca460..84dfceb9 100644
GC> --- a/skeleton.cpp
GC> +++ b/skeleton.cpp
GC> @@ -930,9 +930,15 @@ void Skeleton::UponPreferences(wxCommandEvent&)
GC> }
GC> }
GC>
GC> +#include "single_choice_popup_menu.hpp"
GC> void Skeleton::UponTestAppStatus(wxCommandEvent&)
GC> {
GC> - status() << "Test status() ." << LMI_FLUSH;
GC> + wxArrayString strings;
GC> + strings.Add("One");
GC> + strings.Add("Two");
GC> + strings.Add("Three");
GC> + int selection = SingleChoicePopupMenu(strings, "Test").Choose();
GC> + status() << "Test status() . " << selection <<
LMI_FLUSH;
GC> }
GC>
GC> void Skeleton::UponTestAppWarning(wxCommandEvent&)
GC>
--------->8-------->8-------->8-------->8-------->8-------->8-------->8-------
FWIW I can confirm that this works correctly for me too (and also with
explicit, and different, accelerators, for "&Two" and "T&hree").
Regards,
VZ