[阅读: 403] 2005-03-13 16:18:07
procedure TPSScript.SetCompiled(const Data: string);
var
i: Integer;
begin
FExec.Clear;
FExec.ClearspecialProcImports;
FExec.ClearFunctionList; //此处三行应该清楚了好多东西
if ri <> nil then
begin
RI.Free;
RI := nil;
end;
RI := TPSRuntimeClassImporter.Create;
if assigned(FOnExecImport) then
FOnExecImport(Self, FExec, RI);//估计要在此时注册用到的东西
RegisterClassLibraryRuntime(Exec, RI);
for i := 0 to FPlugins.Count -1 do //系统稳定后应该可以制作plugin来自动进行
begin
TPSPluginItem(FPlugins.Items[i]).Plugin.ExecOnUses(Self);
end;
if not FExec.LoadData(Data) then
raise Exception.Create(GetExecErrorString); //报错是这两行报的
end;