← Back to team overview

kicad-developers team mailing list archive

Re: Bug: ThrowIOError with GetChars() formatting parameter

 

Thanks Henner.  I'll take a look at it when I get a chance.  I'm sure
this isn't the only place this pattern is used.  If you have a patch,
please submit it.

Thanks,

Wayne

On 12/3/2015 3:46 AM, Henner Zeller wrote:
> Hi,
> Playing with the spectra import/export, I encountered a bug: in that
> code are constructs such as
> 
>    ThrowIOError( _("some formatting %s"), GetChars( someWxString ));
> 
> They are ultimately dealt with wxString::PrintfV( fmt, args );
> 
> The output, however, is not as expected. A someWxString with "REF**"
> was only displayed as "R". Changing the GetChars() to TO_UTF8() works.
> 
> I suspect that whatever is returned by GetChars() is not properly
> passed through the var-args argument, while the simple const char* of
> TO_UTF8() does work. I am not sure though if that is the 'right'
> solution as this might be different on Windows ? So I'll leave this to
> someone more knowledgeable in wxString quirks on different platforms
> ...
> 
> -h
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 



Follow ups

References