Hi. I am trying to precompile Pascal Script(s) in Delphi 6. (Using RemObjects Pascal Script for Delphi - 3.0.49.861)
I then want to load them back at a later time in my application so they can be run.
I already have scripts compiling and executing at run time with no issues. I need to precompile for performance reasons.
Now when I try to load the compiled script Delphi excepts with 'Cannot Import VALUE_TEAMCODE.'
Value_TeamCode is a function in my Delphi app that I have already registered with Pascal Script.
Here is what I tried (very rough Psudocode)
Note re code: FPascalScript is a TPSScriptDebugger
//=============================
//Register custom functions with Pascal Script
FuncsRegister;
//Load script
FPascalScript.Script.AddStrings(AContent);
//Compile script
FPascalScript.Compile;
//Get compiled script
FPascalScript.GetCompiled(sCompiledScript)
//Try and set script back in - ERROR Here 'Cannot Import VALUE_TEAMCODE'
FPascalScript.PascalScript.Debugger.SetCompiled(sCompiledScript);
//=============================
Maybe I am going about this wrong. I am not sure if it is even possible to load precompiled script.
I searched on RemObjects WebSite Wiki but the Pascal Script help is deleted.
Any help appreciated.