kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #03319
Re: wxString.c_str()
-
To:
kicad-devel@xxxxxxxxxxxxxxx
-
From:
"emmedics4" <marco.serantoni@...>
-
Date:
Mon, 12 Oct 2009 08:49:00 -0000
-
In-reply-to:
<4AD24071.5040100@...>
-
User-agent:
eGroups-EW/0.82
--- In kicad-devel@xxxxxxxxxxxxxxx, Dick Hollenbeck <dick@...> wrote:
> Jean-Pierre & Other Developers,
> It is my understanding that on newer versions of wxWidgets, we will not
> be able to pass wxString.c_str() to the Printf() function of wxString.
> And wxString.GetData() will not exist.
> So according to my understanding, we are better writing:
>
> wxString s;
> wxString formatMe;
>
> s.Printf( wxT("%s"), GetChars( formatMe ) );
> than this:
> s.Printf( wxT("%s"), formatMe.c_str() );
> For 2.9 or 3.0 the c_str() will not work, at least that is my
> understanding based on a snapshot 5 months ago when I wrote GetChars().
Just to focus better the situation there is an equivalence in wx2.9 for c_str() and is GetData().
Different will be the situation for the charset as wx3.0 will manage only UNICODE strings.
--
Marco
Follow ups
References