Search found 2580 matches

by PB
Tue Oct 20, 2020 11:56 am
Forum: Platform Related Issues
Topic: wxString::Format on the Mac? Anyone else had problems?
Replies: 15
Views: 345

Re: wxString::Format on the Mac? Anyone else had problems?

Seems like this warrants a ticket on wxTrac. It would be better if you actually stepped into wxWidgets code and found where it fails, may not be that difficult.

EDIT: Sorry, I forgot that you already found the culprit: wxVsnprintf().
by PB
Tue Oct 20, 2020 11:20 am
Forum: Platform Related Issues
Topic: wxString::Format on the Mac? Anyone else had problems?
Replies: 15
Views: 345

Re: wxString::Format on the Mac? Anyone else had problems?

Well, if you remove the kanji, you are using only ASCII-7 (compatible with UTF-8) so no wonder the tests pass. Unfortunately, all I can say is that it works on Windows (I do/can not use MacOS) kanji-format.png #include <wx/wx.h> class MyApp : public wxApp { public: bool OnInit() override { // do not...
by PB
Tue Oct 20, 2020 5:24 am
Forum: General Development
Topic: wxWebView migrate to WebView2 on Windows?
Replies: 1
Views: 64

Re: wxWebView migrate to WebView2 on Windows?

It has been available for quite some time, see wxWEBVIEW_BACKEND_EDGE
https://docs.wxwidgets.org/trunk/classwx_web_view.html
by PB
Mon Oct 19, 2020 6:23 pm
Forum: C++ Development
Topic: Hashmap with wxCommandEvent key
Replies: 7
Views: 155

Re: Hashmap with wxCommandEvent key

BTW, not sure if this was just an example but just to be sure: AFAIK, if you have wxDECLARE_EVENT(MY_EVENT, wxCommandEvent); in a header file and wxDEFINE_EVENT(MY_EVENT, wxCommandEvent); in several source files, the value of MY_EVENT will be different in each of those source files, which is usually...
by PB
Fri Oct 16, 2020 4:34 pm
Forum: Compiler / Linking / IDE Related
Topic: Compiling in Visual Studio
Replies: 7
Views: 229

Re: Compiling in Visual Studio

ONEEYEMAN wrote:
Fri Oct 16, 2020 4:17 pm
Why do you think you can't supply the debug version of your software?
AFAIK, at least because:
1. You are not allowed to distribute debug version of the CRT.
2. Debug build of application can be much, much slower (e.g., some container access) than the release build.
by PB
Thu Oct 15, 2020 6:05 pm
Forum: C++ Development
Topic: Deallocate memory of wxGrid
Replies: 10
Views: 288

Re: Deallocate memory of wxGrid

Can't you just use wxGrid::ClearGrid()?

Anyway, I would call DeleteRows() if I wanted to keep the columns, DeleteColumns() otherwise.

But calling wxSizer::Clear(true) deletes the windows owned by the sizer which will clear everything without you needing do anything.
by PB
Thu Oct 15, 2020 5:53 pm
Forum: C++ Development
Topic: Deallocate memory of wxGrid
Replies: 10
Views: 288

Re: Deallocate memory of wxGrid

Post the Connect() call then, including context (from which class and method it is called). Better yet, do not use obsolete Connect() and use Bind() instead. See here for an example of using Connect() incorrectly, leading to a crash: https://forums.wxwidgets.org/viewtopic.php?f=1&t=34191#p140623 But...
by PB
Thu Oct 15, 2020 5:25 pm
Forum: C++ Development
Topic: Deallocate memory of wxGrid
Replies: 10
Views: 288

Re: Deallocate memory of wxGrid

Without having seen the access code, I can have only two guesses for the most common mistakes 1. Shadowed variable class MyFrame ... { wxGrid* gridTable; MyFrame() { // local variable shadows the member variable wxGrid* gridTable = new .... } void MyHandler() { use uninitialized member variable grid...
by PB
Thu Oct 15, 2020 4:34 pm
Forum: C++ Development
Topic: wxSpinCtrl minimum value problem
Replies: 3
Views: 110

Re: wxSpinCtrl minimum value problem

(There is no wxWidgets 3.13 so I assume you meant 3.1.3) I have just tried with 3.1.4 and the widgets sample: works as expected, I can go down to the minimum value just fine. EDIT This simple code works as well with the master #include <wx/wx.h> #include <wx/spinctrl.h> class MyApp : public wxApp { ...
by PB
Thu Oct 15, 2020 9:21 am
Forum: wxCode
Topic: wxGraphicsContext has not been declared
Replies: 8
Views: 357

Re: wxGraphicsContext has not been declared

I think this is wrong. Not only are you building the library twice for each conifiguration (Debug and Release), firstly as multilib and then as monolithic; you are having both multilib and monolithic build in the same folder (which also means overwriting the build-specific setup.h). This makes littl...
by PB
Wed Oct 14, 2020 6:21 pm
Forum: wxCode
Topic: wxGraphicsContext has not been declared
Replies: 8
Views: 357

Re: wxGraphicsContext has not been declared

I will try wxUSE_GRAPHICS_CONTEXT=1 to see what will happen. Just to make sure we are on the same page: If you are using wxWidgets 3.1.4, it should be set to 1. If you are using wxWidgets 3.0.x, you need to set in the master setup.h, do a clean rebuild of wxWidgets and hope it builds. Either way, y...
by PB
Wed Oct 14, 2020 2:15 pm
Forum: wxCode
Topic: wxGraphicsContext has not been declared
Replies: 8
Views: 357

Re: wxGraphicsContext has not been declared

I am not familiar with wxPDFium: does it even support MinGW on MS Windows? FWIW, AFAIK similar Chromium does not. Are you really using wxWidgets 3.1.4: In another thread you claimed to use the git master (= v3.1.5) but based on their names the libraries you built were actually for 3.0? Is wxUSE_GRAP...
by PB
Wed Oct 14, 2020 5:58 am
Forum: wxCode
Topic: wxGraphicsContext has not been declared
Replies: 8
Views: 357

Re: wxGraphicsContext has not been declared

AFAIK, declaration error is a compiler error, not a linker one. That would mean there is an include or forward declaration missing somewhere. However, I am not sure if wxWidgets 3.0 support wxGC with MinGW, I would check if wxUSE_GRAPHICS_CONTEXT is defined to 1. EDIT Unlike wxWidgets 3.1.4, wxWidge...
by PB
Tue Oct 13, 2020 6:46 pm
Forum: Compiler / Linking / IDE Related
Topic: How must build to produce those libs on Win10?
Replies: 14
Views: 341

Re: How must build to produce those libs on Win10?

OK, I tried with sh.exe in the PATH (from git\bin) and I got the same or very similar error as the op. One can easily test if sh.exe is in the PATH with where $path:sh.exe As stahta01 advised, after adding SHELL=cmd.exe parameter the build did not fail. Sorry for saying it was useless before, my bad...
by PB
Tue Oct 13, 2020 10:49 am
Forum: Compiler / Linking / IDE Related
Topic: How must build to produce those libs on Win10?
Replies: 14
Views: 341

Re: How must build to produce those libs on Win10?

I see, I missed that it was confirmed there is "sh.exe" in the PATH but I guess it makes sense. I know that with older CMake versions, sh.exe could not be in path when using MinGW makefiles generator. I was probably just lucky to never have sh.exe in my PATH, I rarely let paths to be added there. TB...