ISSUE With TWebForm.CreateNew

Hi,

I want to create a new form embedding into a TWebPanel.

I use this to code to do this, write in a OnClick event of Ribbon Button:
TfMunimed is a class of new form...

procedure TfMmain.tbbFICH_UnidadesMedidaClick(Sender: TObject);
var
fUunimed: TfMunimed;

{Crida a initForm del formulari que creem}

procedure AfterCreate;
var
paramsIN: TparsMunimedIN;
begin
fUunimed.InitForm(paramsIN);
end;

begin
fUunimed:=TfMunimed.CreateNew('CONTAINER',@AfterCreate);
fUunimed.ShowModal;
end;

In the TWebPanel i put the string CONTAINER in the ElementID property...

When i compile, i receive this error:

[Error] uMmain.pas(97): Incompatible type arg no. 2: Got "procedural type", expected "String"

It seem that the compiler not assume the correct overload of CreateNew method...

o you see where is the problem ?

Thanks !

Hi,

I was fix my problem...

The definition of procedure AfterCreate is erroneous. I not define parameters.

The correct definition is:

procedure AfterCreate (AForm: TObject);

Without this, the CreateNew method of TWebForm cannot determine the correct overload version of call...

Thanks.