| 626 | } |
| 627 | |
| 628 | void CMainFrame::OnScriptDebug() |
| 629 | { |
| 630 | // save current script if modified |
| 631 | if (!AfxGetApp()->SaveAllModified()) |
| 632 | return; |
| 633 | // run the (main) script |
| 634 | // run the script |
| 635 | CQpadDoc* pDoc = (CQpadDoc*)GetActiveDocument(); |
| 636 | LPCTSTR name = pDoc->GetPathName(); |
| 637 | ASSERT(name != NULL); |
| 638 | if (!GetEvalView()->Debug(name, *name?name:pDoc->GetTitle())) { |
| 639 | CString msg; |
| 640 | msg.LoadString(IDS_RUN_FAILED); |
| 641 | AfxMessageBox(msg); |
| 642 | return; |
| 643 | } |
| 644 | // update status info |
| 645 | if (!*name || name != m_strRunPathName) SetStatusInfo(); |
| 646 | UpdateTitle(); |
| 647 | // change to eval pane |
| 648 | ActivateEvalView(); |
| 649 | ResetEvalView(); |
| 650 | } |
| 651 | |
| 652 | void CMainFrame::OnScriptBreak() |
| 653 | { |