Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method PTF_ValidateAndAskSave () as String id:Method_LibPTF_dlgCreateEditTestScript_PTF_ValidateAndAskSave 
 | 
{ 
 | 
  #keys: '[103546.0.95255351]' 
 | 
  Body: 
 | 
  [* 
 | 
    // Validate the script and prompts user for saving the script if it is invalid 
 | 
    errormsg   := this.PTF_ValidateScript( edtActionScript.Text() ); 
 | 
    testscript := Dialog.Data(); 
 | 
     
 | 
    //format the error message when there is an error in validation, and flag validscript flag. 
 | 
    if( errormsg.Length() > 0 ) 
 | 
    { 
 | 
      errormsg := "The following error is found in the script:" + String::NewLine() + String::NewLine() 
 | 
                  + errormsg + String::NewLine() + "Do you still want to save the script?"; 
 | 
     
 | 
      testscript.IsScriptValid( false ); 
 | 
    } 
 | 
    else 
 | 
    { 
 | 
      testscript.IsScriptValid( true ); 
 | 
    } 
 | 
     
 | 
    return errormsg; 
 | 
  *] 
 | 
} 
 |