wxMessageOutput* wxMessageOutput::Get()
{
+ // FIXME this is an hack
+ static bool inGet = FALSE;
+
+ if(!ms_msgOut && wxTheApp && !inGet)
+ {
+ inGet = TRUE;
+ wxTheApp->DoInit();
+ }
+
+ inGet = FALSE;
return ms_msgOut;
}
out.PrintfV(format, args);
va_end(args);
- fprintf(stderr, "%s", out.mb_str());
+ fprintf(stderr, "%s", (const char*) out.mb_str());
}
// ----------------------------------------------------------------------------
va_end(args);
#ifndef __WXMSW__
- out.Replace("\t"," ");
+ out.Replace(wxT("\t"),wxT(" "));
#endif
::wxMessageBox(out);
}
// wxMessageOutputLog
// ----------------------------------------------------------------------------
-#if wxUSE_GUI && defined(__WXMOTIF__)
-
void wxMessageOutputLog::Printf(const wxChar* format, ...)
{
va_list args;
out.PrintfV(format, args);
va_end(args);
- out.Replace("\t"," ");
+ out.Replace(wxT("\t"),wxT(" "));
// under Motif, wxMessageDialog needs a parent window, so we use
// wxLog, which is better than nothing
- ::wxLogMessage("%s", out.c_str());
+ ::wxLogMessage(wxT("%s"), out.c_str());
}
-
-#endif // wxUSE_GUI