Search found 63 matches

by bsenftner
Thu Jan 09, 2020 4:24 pm
Forum: C++ Development
Topic: medium to large programmatic updates to a wxTextCtrl
Replies: 1
Views: 110

medium to large programmatic updates to a wxTextCtrl

I have a multi-line wxTextCtrl that sits in a wxPanel next to a wxGlCanvas. The wxGlCanvas updates at a 30 fps rate, and the wxTextCtrl displays information messages generated by the wxGlCanvas code as it runs. One if the things that can be sent to the wxTextCtrl are text files (scripts) associated ...
by bsenftner
Mon Aug 12, 2019 8:45 pm
Forum: C++ Development
Topic: wxSingleInstanceChecker (behavior change) and Auto Application Restart conflict?
Replies: 3
Views: 190

Re: wxSingleInstanceChecker (behavior change) and Auto Application Restart conflict?

Thanks for the info. The primary type of crash we experience is users overloading their systems, which are then killed via Task Manager or similar. Our app does video analysis, and inexperienced users can overwhelm a system to unresponsiveness. So it's killed. There is little one can do with people ...
by bsenftner
Mon Aug 12, 2019 6:41 pm
Forum: C++ Development
Topic: wxSingleInstanceChecker (behavior change) and Auto Application Restart conflict?
Replies: 3
Views: 190

wxSingleInstanceChecker (behavior change) and Auto Application Restart conflict?

Developing with latest wxWidgets in Visual Studio 2015 C++ on Win10. We have successfully been using wxSingleInstanceChecker in combination with the Win32 API RegisterApplicationRestart() to relaunch our wxWidgets application after crashes. However, we just found that Application Restart is no longe...
by bsenftner
Thu Jul 25, 2019 7:23 pm
Forum: C++ Development
Topic: wxGetTextFromUser() very delayed return
Replies: 4
Views: 193

Re: wxGetTextFromUser() very delayed return

Well, I must have had a "bad library compile" with my previous build, because a fresh download and rebuilding of the wxWidgets source works perfectly fine, as expected. I'd downloaded the source to build a step-wise debugging version, which I have now, but don't need anymore. (I'm sure a step-wise d...
by bsenftner
Thu Jul 25, 2019 1:00 pm
Forum: C++ Development
Topic: wxGetTextFromUser() very delayed return
Replies: 4
Views: 193

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: 193

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: 360

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: 391

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: 172

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: 391

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: 391

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: 360

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: 391

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: 391

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...