0002353: Improvement of TPSScript

git-svn-id: http://code.remobjects.com/svn/pascalscript@14 5c9d2617-0215-0410-a2ee-e80e04d1c6d8
This commit is contained in:
carlokok 2006-09-19 09:53:35 +00:00
parent e76d50dfd3
commit 7be021df9b

View File

@ -566,7 +566,7 @@ begin
RI := TPSRuntimeClassImporter.Create;
for i := 0 to FPlugins.Count -1 do
begin
if TPSPluginItem(FPlugins.Items[i]) <> nil then
if (TPSPluginItem(FPlugins.Items[i]) <> nil) and (TPSPluginItem(FPlugins.Items[i]).Plugin <> nil) then
TPSPluginItem(FPlugins.Items[i]).Plugin.ExecImport1(Self, ri);
end;
@ -574,13 +574,14 @@ begin
for i := 0 to FPlugins.Count -1 do
begin
if TPSPluginItem(FPlugins.Items[i]) <> nil then
TPSPluginItem(FPlugins.Items[i]).Plugin.ExecImport2(Self, ri);
if (TPSPluginItem(FPlugins.Items[i]) <> nil)and (TPSPluginItem(FPlugins.Items[i]).Plugin <> nil) then
TPSPluginItem(FPlugins.Items[i]).Plugin.ExecImport2(Self, ri);
end;
RegisterClassLibraryRuntime(Exec, RI);
for i := 0 to FPlugins.Count -1 do
begin
TPSPluginItem(FPlugins.Items[i]).Plugin.ExecOnUses(Self);
if (TPSPluginItem(FPlugins.Items[i]) <> nil)and (TPSPluginItem(FPlugins.Items[i]).Plugin <> nil) then
TPSPluginItem(FPlugins.Items[i]).Plugin.ExecOnUses(Self);
end;
FCanAdd := True;
FComp.BooleanShortCircuit := icBooleanShortCircuit in FCompOptions;
@ -765,18 +766,21 @@ begin
begin
for i := 0 to FPlugins.Count -1 do
begin
TPSPluginItem(FPlugins.Items[i]).Plugin.CompOnUses(Self);
if (TPSPluginItem(FPlugins.Items[i]) <> nil)and (TPSPluginItem(FPlugins.Items[i]).Plugin <> nil) then
TPSPluginItem(FPlugins.Items[i]).Plugin.CompOnUses(Self);
end;
for i := 0 to FPlugins.Count -1 do
begin
TPSPluginItem(FPlugins.Items[i]).Plugin.CompileImport1(self);
if (TPSPluginItem(FPlugins.Items[i]) <> nil)and (TPSPluginItem(FPlugins.Items[i]).Plugin <> nil) then
TPSPluginItem(FPlugins.Items[i]).Plugin.CompileImport1(self);
end;
DoOnCompImport;
for i := 0 to FPlugins.Count -1 do
begin
TPSPluginItem(FPlugins.Items[i]).Plugin.CompileImport2(Self);
if (TPSPluginItem(FPlugins.Items[i]) <> nil)and (TPSPluginItem(FPlugins.Items[i]).Plugin <> nil) then
TPSPluginItem(FPlugins.Items[i]).Plugin.CompileImport2(Self);
end;
DoOnCompile;
@ -805,21 +809,22 @@ begin
RI := TPSRuntimeClassImporter.Create;
for i := 0 to FPlugins.Count -1 do
begin
if TPSPluginItem(FPlugins.Items[i]) <> nil then
TPSPluginItem(FPlugins.Items[i]).Plugin.ExecImport1(Self, ri);
if (TPSPluginItem(FPlugins.Items[i]) <> nil)and (TPSPluginItem(FPlugins.Items[i]).Plugin <> nil) then
TPSPluginItem(FPlugins.Items[i]).Plugin.ExecImport1(Self, ri);
end;
DoOnExecImport(RI);
for i := 0 to FPlugins.Count -1 do
begin
if TPSPluginItem(FPlugins.Items[i]) <> nil then
TPSPluginItem(FPlugins.Items[i]).Plugin.ExecImport2(Self, ri);
if (TPSPluginItem(FPlugins.Items[i]) <> nil)and (TPSPluginItem(FPlugins.Items[i]).Plugin <> nil) then
TPSPluginItem(FPlugins.Items[i]).Plugin.ExecImport2(Self, ri);
end;
RegisterClassLibraryRuntime(Exec, RI);
for i := 0 to FPlugins.Count -1 do
begin
TPSPluginItem(FPlugins.Items[i]).Plugin.ExecOnUses(Self);
if (TPSPluginItem(FPlugins.Items[i]) <> nil)and (TPSPluginItem(FPlugins.Items[i]).Plugin <> nil) then
TPSPluginItem(FPlugins.Items[i]).Plugin.ExecOnUses(Self);
end;
if not FExec.LoadData(Data) then
raise Exception.Create(GetExecErrorString);