MCPcopy Create free account
hub / github.com/agraef/pure-lang / OnScriptRun

Method OnScriptRun

purepad/MainFrm.cpp:605–626  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

603}
604
605void CMainFrame::OnScriptRun()
606{
607 // save current script if modified
608 if (!AfxGetApp()->SaveAllModified())
609 return;
610 // run the script
611 CQpadDoc* pDoc = (CQpadDoc*)GetActiveDocument();
612 LPCTSTR name = pDoc->GetPathName();
613 ASSERT(name != NULL);
614 if (!GetEvalView()->Run(name, *name?name:pDoc->GetTitle())) {
615 CString msg;
616 msg.LoadString(IDS_RUN_FAILED);
617 AfxMessageBox(msg);
618 return;
619 }
620 // update status info
621 if (!*name || name != m_strRunPathName) SetStatusInfo();
622 UpdateTitle();
623 // change to eval pane
624 ActivateEvalView();
625 ResetEvalView();
626}
627
628void CMainFrame::OnScriptDebug()
629{

Callers

nothing calls this directly

Calls 1

RunMethod · 0.45

Tested by

no test coverage detected