From f7642e89feea2fea584b61a8151231115f879693 Mon Sep 17 00:00:00 2001 From: mattias Date: Sat, 2 Feb 2008 09:39:08 +0000 Subject: [PATCH] cgilaz: fixed creating designed tcgidatamodules and double freeing application git-svn-id: trunk@13950 - --- components/cgi/cgimodules.pas | 4 ++-- components/cgi/demo/samplecgi.lpr | 1 - components/cgi/demo/wmdump.lrs | 3 --- components/cgi/ide/cgilazideintf.pas | 1 - 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/components/cgi/cgimodules.pas b/components/cgi/cgimodules.pas index 38f2e8103d..95ff30b524 100644 --- a/components/cgi/cgimodules.pas +++ b/components/cgi/cgimodules.pas @@ -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; diff --git a/components/cgi/demo/samplecgi.lpr b/components/cgi/demo/samplecgi.lpr index f21d7e9edd..56d0234f1c 100644 --- a/components/cgi/demo/samplecgi.lpr +++ b/components/cgi/demo/samplecgi.lpr @@ -10,6 +10,5 @@ begin Application.Initialize; Application.CreateForm(TDemoModule, DemoModule); Application.Run; - Application.Free; end. diff --git a/components/cgi/demo/wmdump.lrs b/components/cgi/demo/wmdump.lrs index 0f81fc2cc6..8e6d7bee56 100644 --- a/components/cgi/demo/wmdump.lrs +++ b/components/cgi/demo/wmdump.lrs @@ -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' diff --git a/components/cgi/ide/cgilazideintf.pas b/components/cgi/ide/cgilazideintf.pas index 199b37ccd6..ce9f6c3f91 100644 --- a/components/cgi/ide/cgilazideintf.pas +++ b/components/cgi/ide/cgilazideintf.pas @@ -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);