Hi,
I am trying to pass a stringlist to a thread. Not much success so far. In brief this is what I have:
Looking at the error message I quess the problem has to do with the fact that the stringlist FslImages has not been created yet.
However I cannot figure out how to pass a stringlist from form1 to stringlist FslImages in the thread?
Any ideas?
Thanks,
Raoul
I am trying to pass a stringlist to a thread. Not much success so far. In brief this is what I have:
Code:
unit MailThread;
interface
Uses Classes, SysUtils, IdBaseComponent, IdComponent,
IdTCPConnection, IdTCPClient, IdMessageClient, IdSMTP, IdMessage,dialogs;
Type
TMailThread = Class( TThread )
Private
FslImages: TStringList;
Protected
Procedure Execute; Override;
Public
Property slImages: TStringList read FslImages write FslImages;
End;
implementation
{ TMailThread }
procedure TMailThread.Execute;
begin
// inline images
for i := 0 to FslImages.count - 1 do
begin
// ...
end;
end;
end.
Looking at the error message I quess the problem has to do with the fact that the stringlist FslImages has not been created yet.
However I cannot figure out how to pass a stringlist from form1 to stringlist FslImages in the thread?
Any ideas?
Thanks,
Raoul