wxEnumData s_enumData##e( s_enumDataMembers##e ); \
wxEnumData *wxGetEnumData(e) { return &s_enumData##e; } \
template<> void wxStringReadValue(const wxString& s, e &data ) \
- { data = (e) s_enumData##e.GetEnumMemberValue(s); } \
+ { data = (e) s_enumData##e.GetEnumMemberValue(s.c_str()); } \
template<> void wxStringWriteValue(wxString &s, const e &data ) \
{ s = s_enumData##e.GetEnumMemberName((int)data); } \
void FromLong##e( long data, wxAny& result ) \
{
flag = array[i];
int ivalue;
- if ( edata->HasEnumMemberValue( flag, &ivalue ) )
+ if ( edata->HasEnumMemberValue( flag.c_str(), &ivalue ) )
{
data.set( (e) ivalue );
}
{
flag = array[i];
int ivalue;
- if ( edata->HasEnumMemberValue( flag, &ivalue ) )
+ if ( edata->HasEnumMemberValue( flag.c_str(), &ivalue ) )
{
data.m_data |= ivalue;
}
#define wxBEGIN_FLAGS( e ) \
wxEnumMemberData s_enumDataMembers##e[] = {
-#define wxFLAGS_MEMBER( v ) { wxT(#v), v },
+#define wxFLAGS_MEMBER( v ) { wxT(#v), static_cast<int>(v) },
#define wxEND_FLAGS( e ) \
{ NULL, 0 } }; \
if ( m_toString )
(*m_toString)( data, result );
else
- wxLogError( wxGetTranslation(_T("String conversions not supported")) );
+ wxLogError( wxGetTranslation(wxT("String conversions not supported")) );
}
// convert a string into a wxAny holding the corresponding data in this type
if( m_fromString )
(*m_fromString)( data, result );
else
- wxLogError( wxGetTranslation(_T("String conversions not supported")) );
+ wxLogError( wxGetTranslation(wxT("String conversions not supported")) );
}
// statics:
if( m_toLong )
(*m_toLong)( data, result );
else
- wxLogError( wxGetTranslation(_T("Long Conversions not supported")) );
+ wxLogError( wxGetTranslation(wxT("Long Conversions not supported")) );
}
// convert a long into a wxAny holding the corresponding data in this type
if( m_fromLong )
(*m_fromLong)( data, result );
else
- wxLogError( wxGetTranslation(_T("Long Conversions not supported")) );
+ wxLogError( wxGetTranslation(wxT("Long Conversions not supported")) );
}
private: