From e5e00893ef00bde144e553d9eed65fcfef6ad4da Mon Sep 17 00:00:00 2001 From: inoussa Date: Mon, 29 Jun 2009 10:42:54 +0000 Subject: [PATCH] Fix : AV in the implementation generator. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@876 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- wst/trunk/ws_helper/generator.pas | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/wst/trunk/ws_helper/generator.pas b/wst/trunk/ws_helper/generator.pas index 210c575e1..1892dde18 100644 --- a/wst/trunk/ws_helper/generator.pas +++ b/wst/trunk/ws_helper/generator.pas @@ -1712,17 +1712,27 @@ var end; procedure GenerateRegistrationProc(); - Var - strBuff : string; + var + strBuff, locClassName, locInterfName : string; Begin NewLine(); BeginAutoIndent(); strBuff := ExtractserviceName(AIntf); + locClassName := strClassName; + locInterfName := QuotedStr(AIntf.Name); NewLine(); WriteLn('procedure Register%sImplementationFactory();',[strBuff]); WriteLn('Begin'); IncIndent(); - WriteLn('GetServiceImplementationRegistry().Register(%s,TImplementationFactory.Create(%s,wst_GetServiceConfigText(%s)) as IServiceImplementationFactory);',[QuotedStr(AIntf.Name),strClassName,QuotedStr(AIntf.Name)]); + strBuff := Format( + 'GetServiceImplementationRegistry().Register(' + + '%s,' + + 'TImplementationFactory.Create(' + + '%s,wst_GetServiceConfigText(%s)' + + ') as IServiceImplementationFactory);', + [locInterfName,locClassName,locInterfName] + ); + WriteLn(strBuff); DecIndent(); WriteLn('End;'); EndAutoIndent();