I am using 3.0.0 and I've noticed that whenever I press enter in a wxTextCtrl that does not have wxTE_PROCESS_ENTER property set, the event (enter press) gets handled in my own completely unrelated handler which has nothing to do with the correct event handler. The proper handler probably handles it, but due to 3.0.0 needing Event.Skip() in every wxFocusEvent handler, the event proceeds further. Who knows where it secretly goes before dying off. Sometimes the focus cursor gets trapped inside wxTextCtrl which has wxTE_PROCESS_ENTER.
What could possibly cause this?
wxTE_PROCESS_ENTER handled too many times (over 1) Topic is solved
Re: wxTE_PROCESS_ENTER handled too many times (over 1)
It sounds like a bug, but your description is a little confusing, so it's hard to say. We'll probably need a minimal sample that shows the problem.
Use the source, Luke!
Re: wxTE_PROCESS_ENTER handled too many times (over 1)
Could it be that I am using enum when connecting event handlers to events?
Note that this code used to work in wxWidgets 2.8.12 but does not in 3.0.0.
Code: Select all
enum
{
MenuOption_Prompt,
MenuOption_IDFix,
MenuOption_Buttons,
MenuOption_Tips,
MenuOption_About,
ToolBar_Open,
ToolBar_Save,
ToolBar_Show,
ToolBar_Help
};
Code: Select all
Connect(MenuOption_IDFix, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(AGE_Frame::OnMenuOption));
Code: Select all
void AGE_Frame::OnMenuOption(wxCommandEvent &Event)
{
switch(Event.GetId())
{
...
Re: wxTE_PROCESS_ENTER handled too many times (over 1)
I don't know if this is the cause for your problem, but it's definitely a bad idea. Your own identifiers should be higher than wxID_HIGHEST.Could it be that I am using enum when connecting event handlers to events?
Code: Select all
enum
{
MenuOption_Prompt = wxID_HIGHEST+1,
MenuOption_IDFix,
MenuOption_Buttons,
...
Use the source, Luke!