Problem with Util.cpp on Mac[Fixed]

Page 1 of 1
4 posts
Problem with Util.cpp on Mac[Fixed]

elliswr
MMEX Developer

Posts: 151
Joined: Tue May 05, 2009 2:21 am
Location: Granbury, TX
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

Nikolay
MMEX Developer

Posts: 2284
Joined: Sat Dec 06, 2008 8:27 am
Location: Sankt-Petersburg, Russia
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

elliswr
MMEX Developer

Posts: 151
Joined: Tue May 05, 2009 2:21 am
Location: Granbury, TX
That worked, thanks Nikolay.

The question now is, will the translation still work?
Re: Problem with Util.cpp on Mac

Nikolay
MMEX Developer

Posts: 2284
Joined: Sat Dec 06, 2008 8:27 am
Location: Sankt-Petersburg, Russia
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.
Page 1 of 1
Who is online

Users browsing this forum: No registered users and 2 guests