Page 1 of 1

Problem with Util.cpp on Mac[Fixed]

Posted: Fri Oct 16, 2009 3:27 am
by elliswr
This line:

Code: Select all

 << wxT('L') << (!categ.IsEmpty() ? categ : _("Split")) << (!subcateg.IsEmpty() ? wxT(":") : wxT("")) << subcateg << endl
gives the following error.

Code: Select all

util.cpp:622: error: operands to ?: have different types 'wxString' and 'const wxChar*'
I don't really understand the syntax here with all the << stuff (never seen it before), but it appears to me that Xcode doesn't like the fact that there are two of these operations in the same line with different data types. Either that or "categ" is of type wxString and _("Split") is of a different type, because I am pretty sure that wxT(":") and wxT("") are both of type wxChar.

Re: Problem with Util.cpp on Mac

Posted: Fri Oct 16, 2009 5:24 am
by Nikolay
Hi,

Try this code:

Code: Select all

<< wxT('L') << (!categ.IsEmpty() ? categ : wxT("Split")) << (!subcateg.IsEmpty() ? wxT(":") : wxT("")) << subcateg << endl

Re: Problem with Util.cpp on Mac

Posted: Fri Oct 16, 2009 5:52 am
by elliswr
That worked, thanks Nikolay.

The question now is, will the translation still work?

Re: Problem with Util.cpp on Mac

Posted: Fri Oct 16, 2009 7:53 am
by Nikolay
elliswr wrote: The question now is, will the translation still work?
Unfortunately no. But I think it's no big deal to give her attention.