cgilaz: fixed creating designed tcgidatamodules and double freeing application

git-svn-id: trunk@13950 -
This commit is contained in:
mattias 2008-02-02 09:39:08 +00:00
parent 2fec45de82
commit f7642e89fe
4 changed files with 2 additions and 7 deletions

View File

@ -79,8 +79,8 @@ end;
procedure TModuledCGIApplication.CreateForm(AClass: TCGIDataModuleClass;
Var Reference: TCGIDataModule);
begin
debugln('TModuledCGIApplication.CreateForm ',AClass.CLassName);
Reference:=AClass.CreateNew(Self,0);
//debugln('TModuledCGIApplication.CreateForm ',AClass.CLassName);
Reference:=AClass.Create(Self);
If FMainModule=Nil then
FMainModule:=Reference;
end;

View File

@ -10,6 +10,5 @@ begin
Application.Initialize;
Application.CreateForm(TDemoModule, DemoModule);
Application.Run;
Application.Free;
end.

View File

@ -1,6 +1,3 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TDemoModule','FORMDATA',[
'TPF0'#11'TDemoModule'#10'DemoModule'#12'OnCGIRequest'#7#20'DemoModuleCGIRequ'
+'est'#11'ContentType'#6#9'text/html'#4'left'#3#177#1#3'top'#3'5'#1#6'Height'

View File

@ -124,7 +124,6 @@ begin
+' Application:=TModuledCGIApplication.Create(nil);'+le
+' Application.Initialize;'+le
+' Application.Run;'+le
+' Application.Free;'+le
+'end.'+le
+le;
AProject.MainFile.SetSourceText(NewSource);