pEditorDlg = NULL;
pParamDlg = NULL;
+#if wxUSE_LOG
delete wxLog::SetActiveTarget(new wxLogStderr);
+#endif // wxUSE_LOG
} // DatabaseDemoFrame constructor
DatabaseDemoFrame::~DatabaseDemoFrame()
{
+#if wxUSE_LOG
delete wxLog::SetActiveTarget(NULL);
+#endif // wxUSE_LOG
} // DatabaseDemoFrame destructor
choice_strings[3] = wxT("Spanish");
choice_strings[4] = wxT("Other");
- pNativeLangChoice = new wxChoice(this, EDITOR_DIALOG_LANG_CHOICE, wxPoint( 17, 346), wxSize(277, wxDefaultSize.y), 5, choice_strings);
+ pNativeLangChoice = new wxChoice(this, EDITOR_DIALOG_LANG_CHOICE, wxPoint( 17, 346), wxSize(277, wxDefaultCoord), 5, choice_strings);
pNativeLangMsg = new wxStaticText(this, EDITOR_DIALOG_LANG_MSG, wxT("Native language:"), wxPoint( 17, 330), wxDefaultSize, 0, wxT("NativeLangMsg"));
wxString radio_strings[2];
{
wxChar Dsn[SQL_MAX_DSN_LENGTH + 1];
wxChar DsDesc[255];
- wxStringList strList;
+ wxSortedArrayString strArr;
while (wxDbGetDataSource(wxGetApp().DbConnectInf->GetHenv(), Dsn,
SQL_MAX_DSN_LENGTH+1, DsDesc, 255))
- strList.Add(Dsn);
-
- strList.Sort();
- strList.Add(wxT(""));
+ {
+ strArr.Add(Dsn);
+ }
- wxString current;
- for (wxStringList::Node *node = strList.GetFirst(); node; node = node->GetNext() )
+ for (size_t i=0; i < strArr.GetCount(); i++ )
{
- current = node->GetData();
- if(!current.IsEmpty())
- pParamODBCSourceList->Append(current.c_str());
+ pParamODBCSourceList->Append(strArr[i].c_str());
}
} // CparameterDlg::FillDataSourceList()