void DebuggerSettingsDlg::OnOk(wxCommandEvent &e)
{
	wxUnusedVar(e);
	//go over the debuggers and set the debugger path
	for (size_t i=0; i<(size_t)m_book->GetPageCount(); i++) {
		DebuggerPage *page =  (DebuggerPage *)m_book->GetPage(i);

		//find the debugger
		DebuggerInformation info;
		DebuggerMgr::Get().GetDebuggerInformation(page->m_title, info);

		//populate the information and save it
		info.enableDebugLog           = page->m_checkBoxEnableLog->GetValue();
		info.enablePendingBreakpoints = page->m_checkBoxEnablePendingBreakpoints->GetValue();
		info.path                     = page->m_textCtrDbgPath->GetValue();
		info.name                     = page->m_title;
		info.breakAtWinMain           = page->m_checkBreakAtWinMain->IsChecked();
		info.showTerminal             = page->m_checkShowTerminal->IsChecked();
		info.consoleCommand           = EditorConfigST::Get()->GetOptions()->GetProgramConsoleCommand();
		info.useRelativeFilePaths     = page->m_checkUseRelativePaths->IsChecked();
		info.catchThrow               = page->m_catchThrow->IsChecked();
		info.showTooltips             = page->m_showTooltips->IsChecked();
		info.startupCommands          = page->m_textCtrlStartupCommands->GetValue();
		info.maxDisplayStringSize     = page->m_spinCtrlNumElements->GetValue();
		info.resolveLocals            = page->m_checkBoxExpandLocals->IsChecked();
#ifdef __WXMSW__
		info.debugAsserts             = page->m_checkBoxDebugAssert->IsChecked();
#endif
		info.autoExpandTipItems       = page->m_checkBoxAutoExpand->IsChecked();
		DebuggerMgr::Get().SetDebuggerInformation(page->m_title, info);
	}

	//copy the commands the serialized object m_data
	int count = m_listCtrl1->GetItemCount();
	std::vector<DebuggerCmdData> cmdArr;
	for(int i=0; i<count; i++){
		DebuggerCmdData cmd;
		cmd.SetName      ( GetColumnText(m_listCtrl1, i, 0) );
		cmd.SetCommand   ( GetColumnText(m_listCtrl1, i, 1) );
		cmd.SetDbgCommand( GetColumnText(m_listCtrl1, i, 2) );
		cmdArr.push_back(cmd);
	}
	m_data.SetCmds(cmdArr);

	//save the debugger commands
	DebuggerConfigTool::Get()->WriteObject(wxT("DebuggerCommands"), &m_data);
	EndModal(wxID_OK);
}
DebuggerPreDefinedTypes PreDefinedTypesPage::GetPreDefinedTypes()
{
	int count = m_listCtrl1->GetItemCount();
	DebuggerCmdDataVec cmdArr;
	
	for(int i=0; i<count; i++) {
		DebuggerCmdData cmd;
		cmd.SetName      ( GetColumnText(m_listCtrl1, i, 0) );
		cmd.SetCommand   ( GetColumnText(m_listCtrl1, i, 1) );
		cmd.SetDbgCommand( GetColumnText(m_listCtrl1, i, 2) );
		cmdArr.push_back(cmd);
	}
	
	m_data.SetCmds(cmdArr);
	return m_data;
}