Hi...
I've figured out a problem using the new "Prepare"-function on a datamodule. To reproduce this behaviour, just create a simple new VCL-app, place a TRtcHttpClient and a TRtcClientModule on Form1 and use the following code for the OnCreate-Event:
procedure TfrmMain.FormCreate(Sender: TObject);
var
AResult: TRtcValue;
begin
with rtcClientModule do
begin
Prepare('sampleFunc');
with Param.NewArray('PARAMS') do
begin
asString[0] := 'data1';
asString[1] := 'data2';
asString[2] := 'data3';
end;
AResult := Execute(False);
try
ShowMessage('Done!');
finally
AResult.Free;
end;
end;
end;
Start the app, and as soon as the "Done"-MessageBox appears, close the app (e.g. ALT+F4). The app will close immediantly.
Now put the some code on a TDataModule and restart the app (remove the MainForm first). As soon as the infomessage appears,
try to close the app now....and it will about 10 seconds, bevore the app is closed.
If you replace the Prepare-method with the older one (Data.NewFunction('...').NewArray....) and use the "Call(...)"-method, everything
is fine.
It seems to be a problem placing the components on a TDataModule instead of a normal Form (BDS2009).
Any idea?
Thank you,
Marc