Search found 74 matches

by bsenftner
Thu Jul 25, 2019 1:00 pm
Forum: C++ Development
Topic: wxGetTextFromUser() very delayed return
Replies: 4
Views: 326

Re: wxGetTextFromUser() very delayed return

I am developing and debugging in Win10, so I have not tried Linux yet. I pass in the main window as the parent to the wxGetTextfromUser(). Another developer, compiling the program separately, also sees wxGetTextFromUser()'s delayed return, but is able to get the return to occur by generating toolbar...
by bsenftner
Thu Jul 25, 2019 1:56 am
Forum: C++ Development
Topic: wxGetTextFromUser() very delayed return
Replies: 4
Views: 326

wxGetTextFromUser() very delayed return

Working in C++ VisualStudio 2015, deploying to flavors of Windows & Linux, and using the latest wxWidgets. I have a multi-window application, each window being a wxFrame containing a wxNotebook, with toolbars on the notebook pages, and the majority of the secondary windows being video players with a...
by bsenftner
Mon Jun 24, 2019 6:55 pm
Forum: C++ Development
Topic: Threaded Job/Queue Manager getting stuck?
Replies: 8
Views: 607

Re: Threaded Job/Queue Manager getting stuck?

For future readers of this thread, the situation is a case of out of date docs. Apparently, AddPendingEvent() is a wrapper around wxQueueEvent(), and the documentation recommending use of wxQueueEvent() is out of date. The key take away for events crossing thread boundaries is when sending non-scala...
by bsenftner
Mon Jun 24, 2019 5:11 pm
Forum: C++ Development
Topic: events, secondary threads & app remote control
Replies: 10
Views: 664

Re: events, secondary threads & app remote control

I believe I am in a NIH (not invented here) catch-22. My CTO does not use any custom events in his wxWidgets projects; he simply uses wxEVT_TEXT for all customized event situations, and then uses Connect() with unique IDs to bind different function pointers to the unique IDs. He has success with oth...
by bsenftner
Mon Jun 24, 2019 3:36 pm
Forum: C++ Development
Topic: AddPendingEvent() documentation is wrong
Replies: 3
Views: 294

AddPendingEvent() documentation is wrong

This is fairly confusing: The documentation around AddPendingEvent() says: Add an event to be processed later: notice that this function is not safe to call from threads other than main, use QueueEvent() Yet, AddPendingEvent() is literally: virtual void AddPendingEvent(const wxEvent& event) { // com...
by bsenftner
Mon Jun 24, 2019 12:53 pm
Forum: C++ Development
Topic: events, secondary threads & app remote control
Replies: 10
Views: 664

Re: events, secondary threads & app remote control

Doublemax, The definition of EVT_Command is #define EVT_COMMAND(winid, event, func) \ wx__DECLARE_EVT1(event, winid, wxCommandEventHandler(func)) While EVT_THREAD is: #define EVT_THREAD(id, func) wx__DECLARE_EVT1(wxEVT_THREAD, id, wxThreadEventHandler(func)) So it looks like my use of EVT_THREAD as ...
by bsenftner
Sat Jun 22, 2019 5:09 am
Forum: C++ Development
Topic: events, secondary threads & app remote control
Replies: 10
Views: 664

Re: events, secondary threads & app remote control

Hmmm... something is not right. I tried a small test case where I converted one event used by communication between threads from using a wxCommandEvent to a wxThreadEvent. However, the event handler is not called when a wxThreadEvent, but is called when a wxCommandEvent. In my application I have a s...
by bsenftner
Sat Jun 22, 2019 2:44 am
Forum: C++ Development
Topic: Threaded Job/Queue Manager getting stuck?
Replies: 8
Views: 607

Re: Threaded Job/Queue Manager getting stuck?

Should the events be wxThreadEvents, and then passed with wxQueueEvent()?

Also, checking event.h, SetString() is not using clone():

void SetString(const wxString& s) { m_cmdString = s; }
by bsenftner
Sat Jun 22, 2019 2:41 am
Forum: C++ Development
Topic: events, secondary threads & app remote control
Replies: 10
Views: 664

Re: events, secondary threads & app remote control

Thank you for this information. So in places where data passes between threads, a wxThreadEvent should be used. Most important, strings should be cloned. In the situation where one creates an event to send, either a wxCommandEvent or wxThreadEvent, if the event is going into wxQueueEvent() then the ...
by bsenftner
Sat Jun 22, 2019 1:19 am
Forum: C++ Development
Topic: events, secondary threads & app remote control
Replies: 10
Views: 664

events, secondary threads & app remote control

Let's say one has a multi-threaded wxWidgets app, with multiple windows, dialogs, toolbars with icon/menu controls, panels and so forth. These are constructed in the conventional manner with wxCommandEvents as the event type used to pass requests around the application. All GUI operations occur in t...
by bsenftner
Fri Jun 21, 2019 11:49 pm
Forum: C++ Development
Topic: Threaded Job/Queue Manager getting stuck?
Replies: 8
Views: 607

Re: Threaded Job/Queue Manager getting stuck?

Can anyone confirm the following? The complete Job/Queue Manager example provided by https://wiki.wxwidgets.org/Inter-Thread_and_Inter-Process_communication is actually thread unsafe because it uses wxCommandEvents to pass strings between threads? Furthermore, the Queue class's Report() method uses ...
by bsenftner
Wed Jun 19, 2019 1:29 am
Forum: C++ Development
Topic: Threaded Job/Queue Manager getting stuck?
Replies: 8
Views: 607

Threaded Job/Queue Manager getting stuck?

Developing in C++ via Visual Studio 2015, using the latest wxWidgets, deploying to recent versions of Windows... I have a multi-window application, where each window is wxFrame based, and has a background thread for exporting data. The background thread is implemented after the full example given en...
by bsenftner
Thu Apr 11, 2019 12:13 am
Forum: C++ Development
Topic: how to hide a complex wxDialog's slow first render?
Replies: 2
Views: 347

how to hide a complex wxDialog's slow first render?

Working in Win10, Visual Studio 2015 C++; deploying to Win7+ flavors of Windows and a few Linux. Using wxWidgets 3.1.2. I have a complex wxDialog with 28 wxStaticBoxSizers holding a checkbox, textCtrl and button each. Plus a separate single wxComboBox on the dialog. These 28 wxStaticBoxSizers are th...
by bsenftner
Sun Dec 09, 2018 3:05 pm
Forum: C++ Development
Topic: Are there tests for alphanumeric but including extended latin unicode?
Replies: 3
Views: 415

Re: Are there tests for alphanumeric but including extended latin unicode?

No answers yet, but for interested people: * Where American English only has upper case and lower case, extended Latin also has "title case", a 2nd form of upper case reserved for use in formal names? * Can anyone explain what "fold case" is? Is that a 4th form of a character, like upper, lower and ...