#endif
// For compilers that support precompilation, includes "wx.h".
-#include <wx/wxprec.h>
+#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#include <wx/wxexpr.h>
+#ifdef new
+#undef new
+#endif
+
#if wxUSE_IOSTREAMH
#include <iostream.h>
#include <fstream.h>
#include <iostream>
#include <fstream>
#ifdef _MSC_VER
-using namespace std;
+//using namespace std;
#endif
#endif
}
OnDatabaseSave(*database);
- char tempFile[400];
- wxGetTempFileName("diag", tempFile);
- FILE* file = fopen(tempFile, "w");
+ wxString tempFile;
+ wxGetTempFileName(wxT("diag"), tempFile);
+ FILE* file = fopen(tempFile.mb_str(wxConvFile), "w");
if (! file)
{
wxEndBusyCursor();
wxExpr *clause = database.FindClauseByFunctor("shape");
while (clause)
{
- char *type = NULL;
+ wxChar *type = NULL;
long parentId = -1;
- clause->AssignAttributeValue("type", &type);
- clause->AssignAttributeValue("parent", &parentId);
+ clause->AssignAttributeValue(wxT("type"), &type);
+ clause->AssignAttributeValue(wxT("parent"), &parentId);
wxClassInfo *classInfo = wxClassInfo::FindClass(type);
if (classInfo)
{
wxExpr *clause = database.FindClauseByFunctor("line");
while (clause)
{
- wxString type("");
+ wxString type;
long parentId = -1;
clause->GetAttributeValue("type", type);
clause->GetAttributeValue("parent", parentId);
- wxClassInfo *classInfo = wxClassInfo::FindClass((char*) (const char*) type);
+ wxClassInfo *classInfo = wxClassInfo::FindClass(type);
if (classInfo)
{
wxLineShape *shape = (wxLineShape *)classInfo->CreateObject();