++count;
}
- Widget listWidget = XmCreateScrolledList(parentWidget,
- (char*)name.c_str(), args, count);
+ Widget listWidget =
+ XmCreateScrolledList(parentWidget,
+ wxConstCast(name.c_str(), char), args, count);
m_mainWidget = (WXWidget) listWidget;
XmString *text = new XmString[items.GetCount()];
size_t i;
for (i = 0; i < items.GetCount(); ++i)
- text[i] = XmStringCreateSimple ((char*)items[i].c_str());
+ text[i] = wxStringToXmString (items[i]);
if ( clientData )
for (i = 0; i < items.GetCount(); ++i)
XmNitemCount, &count,
XmNitems, &strlist,
NULL );
- if( n <= count && n >= 0 )
+ if( n < count && n >= 0 )
return wxXmStringToString( strlist[n] );
else
return wxEmptyString;
// Corrected by Sergey Krasnov from Steve Hammes' code
#if XmVersion > 1001
for (i = 0; i < items.GetCount(); i++)
- text[i] = XmStringCreateSimple((char*)items[i].c_str());
+ text[i] = wxStringToXmString(items[i]);
XmListAddItemsUnselected(listBox, text, items.GetCount(), pos+1);
#else
for (i = 0; i < items.GetCount(); i++)
{
- text[i] = XmStringCreateSimple((char*)items[i].c_str());
+ text[i] = wxStringToXmString(items[i]);
// Another Sergey correction
XmListAddItemUnselected(listBox, text[i], pos+i+1);
}