← Back to team overview

kicad-developers team mailing list archive

Re: Hating wx configuration more than ever...


On Mon, May 07, 2012 at 02:25:44PM -0500, Dick Hollenbeck wrote:
> But I cannot tell you what a wxChar* means THIS MONTH.
> The best thing the wxWidgets folks could do is to start with this line:
> typedef std::string wxString
> and then go fix all the compile errors after that.
> wxString has served too masters and its biggest mistake was coming into existence.

The wx wiki *explicitly* tells to use fscking wxString instead of std::string!
Note that it is recommended to use wxString as much as possible. Do no use char* or std::string unless you use a third-party library that requires you to do so. 

Since I didn't passed --disable-unicode, wxChar* should be a wchar_t*. Also the operator const wxChar * is present... maybe the culprit is lacking the const bit somehow.

Also the 'fun' thing in the wx trunk doc is this:

The wxString class has been completely rewritten for wxWidgets 3.0 and this change was actually the main reason for the calling that version wxWidgets 3.0.

wxString is a class representing a Unicode character string. wxString uses std::basic_string internally (even if wxUSE_STL is not defined) to store its content (unless this is not supported by the compiler or disabled specifically when building wxWidgets) and it therefore inherits many features from std::basic_string. (Note that most implementations of std::basic_string are thread-safe and don't use reference counting.)

So at least part of your suggestion was taken in account... (I'd rather have junked it wxString completely) also part of the fun is that "wxString USES std::basic_string" not "wxString EXTENDS std::basic_string". Yay a PART-OF instead of IS-A relationship...

I don't actually care about 2.9 at the moment...

Lorenzo Marcantonio
Logos Srl

Follow ups