wxString fileName = saveFileDialog->GetPath();
ofstream file;
- file.open(fileName.c_str());
+
+//EED file.open(fileName.c_str());
+ file.open( (const char*) (fileName.mb_str()) );
std::string content="";
if (nameDialog->ShowModal() == wxID_OK)
{
wxString fileName = nameDialog->GetValue();
- cbName=fileName;
+//EED cbName=fileName;
+ cbName=(const char*) (fileName.mb_str());
}
if(!cbName.empty())
wxString fileName = saveFileDialog->GetPath();
ofstream file;
- file.open(fileName.c_str());
+//EED file.open(fileName.c_str());
+ file.open( (const char*) (fileName.mb_str()) );
std::string content="";
void wxGUIEditorGraphicBBS::OnSaveActualDiagram(wxCommandEvent& event)
{
- wxFileDialog * saveFileDialog = new wxFileDialog(this,wxT("Save actual diagram"),wxEmptyString,"NewDiagram","*.bbd",wxSAVE|wxOVERWRITE_PROMPT);
+ wxFileDialog * saveFileDialog = new wxFileDialog(this,wxT("Save actual diagram"),wxEmptyString,wxT("NewDiagram"),wxT("*.bbd"),wxSAVE|wxOVERWRITE_PROMPT);
if (saveFileDialog->ShowModal() == wxID_OK)
{
wxString fileName = saveFileDialog->GetPath();
ofstream file;
- file.open(fileName.c_str());
+//EED file.open(fileName.c_str());
+ file.open( (const char*) (fileName.mb_str()) );
std::string content="";
content += "# ----------------------------------\n";
content += "# - BBTKGEditor v 1.0 BBD BlackBox Diagram file\n";
content += "# - ";
- content += fileName;
+
+//EED content += fileName;
+ content += (const char*) (fileName.mb_str());
+
content += "\n";
content += "# ----------------------------------\n";
content += "\n";
void wxGUIEditorGraphicBBS::OnOpenDiagram(wxCommandEvent& event)
{
- wxFileDialog * openFileDialog = new wxFileDialog(this,wxT("Open diagram"),wxEmptyString,"","*.bbd",wxOPEN|wxFILE_MUST_EXIST);
+ wxFileDialog * openFileDialog = new wxFileDialog(this,wxT("Open diagram"),wxEmptyString,wxT(""),wxT("*.bbd"),wxOPEN|wxFILE_MUST_EXIST);
if (openFileDialog->ShowModal() == wxID_OK)
{
wxString fileName = openFileDialog->GetPath();
ifstream inputStream;
- inputStream.open(fileName.c_str());
+
+//EED inputStream.open(fileName.c_str());
+ inputStream.open( (const char*) (fileName.mb_str()) );
+
+
_tabsMgr->addNewTab();
_tabsMgr->loadDiagram(inputStream);