Example: String-Based Output
This example demonstrates how to retrieve string-based output and display it. In this case, the plug-in retrieves the license code.
import PT_DIAGNOSTICS:*;
class GetLicenseCode extends PTDiagnostics
/* Constructor */
method GetLicenseCode();
/* Public Method */
method GetDiagnosticInfo();
method IsPlugIn();
private
end-class;
method GetLicenseCode;
Local boolean &status;
Local string &sError;
%Super = create PTDiagnostics();
&status = %Super.SetProperty(%This, "Purpose", "String",
"This is a diagnostic to determine your license code");
end-method;
method GetDiagnosticInfo
Local string &sLicenseCode, &sLicenseGroup;
Local boolean &status;
Local string &sError;
SQLExec("SELECT LICENSE_CODE, LICENSE_GROUP FROM PSOPTIONS",
&sLicenseCode, &sLicenseGroup);
&status = %Super.InsertData("String",
"Your License Code is: ", Upper(&sLicenseCode));
end-method;
method IsPlugIn
end-method;