mjsouza_1977 Novato
Registrado: Terça-Feira, 30 de Julho de 2019 Mensagens: 3
|
Enviada: Ter Jul 30, 2019 11:16 pm Assunto: Exception na Thread |
|
|
Não sei onde estou errando executo esta procedure e quando vai executar a Thread anonima cai na Exception, as variaveis estão alimentadas pois ja verifiquei no debug sera que meu codigo tem algum erro?
Quem puder me ajudar fico grato.
procedure TfrmMain.LoadingImages(FListaArquivos, FListaTImage,
FListaTLoading: TStringList);
begin
TThread.CreateAnonymousThread(
procedure
begin
TThread.Synchronize(nil,
procedure
begin
for vIndexLista1 := 0 to FListaTLoading.Count - 1 do
TAniIndicator(frmMain.FindComponent(FListaTLoading[vIndexLista1])).Enabled := True;
end);
for vIndexLista2 := 0 to FListaArquivos.Count - 1 do
begin
ReceiveFileFtp(FListaArquivos.Strings[vIndexLista2],
TImage(frmMain.FindComponent(FListaTImage.Strings[vIndexLista2])),nil);
TAniIndicator(frmMain.FindComponent(FListaTLoading.Strings[vIndexLista2])).Enabled := False;
TAniIndicator(frmMain.FindComponent(FListaTLoading.Strings[vIndexLista2])).Visible := False;
end;
end).Start;
end; |
|