Error get the name of the page in wxauinotebook
Error get the name of the page in wxauinotebook
I'm using ntb->GetPageText(ntb->GetSelection()) in the AUINOTEBOOK_PAGE_CHANGING event an shows me a message dialog error the same method works in wxpython
- tierra
- Site Admin
- Posts: 1355
- Joined: Sun Aug 29, 2004 7:14 pm
- Location: Salt Lake City, Utah, USA
- Contact:
Re: Error get the name of the page in wxauinotebook
It might help to know what the error is.
Re: Error get the name of the page in wxauinotebook
here
C:/wxwidgets/include/wx/strvararg.h(532): assert "(argtype & (wxFormatString::Arg_String)) == argtype" failed in wxArgNormalizerWchar<class wxString const &>::wxArgNormalizerWchar(): format specifier doesn't match argument type
call stack:
[00] wxArgNormalizerWchar<wxString>::wxArgNormalizerWchar<wxString> c:/wxwidgets/include/wx/strvararg.h:681
....
C:/wxwidgets/include/wx/strvararg.h(532): assert "(argtype & (wxFormatString::Arg_String)) == argtype" failed in wxArgNormalizerWchar<class wxString const &>::wxArgNormalizerWchar(): format specifier doesn't match argument type
call stack:
[00] wxArgNormalizerWchar<wxString>::wxArgNormalizerWchar<wxString> c:/wxwidgets/include/wx/strvararg.h:681
....
Re: Error get the name of the page in wxauinotebook
Try to figure out what "ntb->GetSelection()" returns - since it is an "int" and "ntb->GetPageText()" takes an "size_t" there might be some signing issue. Also; You might want to use "event.GetSelection()" or "event.GetOldSelection()" in the event handler instead.
I have a bad habbit of not testing the code I post
Re: Error get the name of the page in wxauinotebook
I usually observe wxArgNormalizerWchar errors when using wxString::Format or similar.
If this is the case you might be using a %d for a size_t type instead of %lu.
If this is the case you might be using a %d for a size_t type instead of %lu.
wxWidgets 3.1.2, MinGW64 8.1.0, g++ 8.1.0, Ubuntu 19.04, Windows 10, CodeLite + wxCrafter
Some people, when confronted with a GUI problem, think "I know, I'll use Eclipse RCP". Now they have two problems.
Some people, when confronted with a GUI problem, think "I know, I'll use Eclipse RCP". Now they have two problems.