User forums > Using Code::Blocks

How to prevent wxSmith from auto overwriting wxS("") string format back to _("")

<< < (3/3)


--- Quote ---Compatibility macro which expands to wxT() in wxWidgets 2 only.

This macro can be used in code which needs to compile with both wxWidgets 2 and 3 versions, in places where the wx2 API requires a Unicode string (in Unicode build) but the wx3 API only accepts a standard narrow string, as in e.g. wxCmdLineEntryDesc structure objects initializers.
--- End quote ---

Tim S.

wx2.x compatibility is not required for wxSmith.
For me a goal for wxSmith is to be able to generate correct and readable wx3.x code.
If it works in wx2.x fine, but it shouldn't be our goal.

In wxssettings.cpp, line 259, you use the macro _() to set the string wxS(""). As far as I understand, this string does not need to be translated (and more, must not...). So a macro as _T() or wxT() or may be wxT_2() should be preferable. And it's probably also the case for some other strings in the same cpp file.

Miguel Gimenez:
Or just "wxS()", _T() and wxT() are not needed anymore.

--- Quote ---Note that since wxWidgets 2.9.0 you shouldn't use wxT() anymore in your program sources
--- End quote ---


[0] Message Index

[*] Previous page

Go to full version