Idhttp workend eventı

FireMonkey ve Mobil uygulama (iOS, Android, Windows Phone) ile ilgili sorularınızı bu foruma sorabilirsiniz.
Cevapla
pairs
Üye
Mesajlar: 43
Kayıt: 12 Nis 2014 07:52

Idhttp workend eventı

Mesaj gönderen pairs »

Merhaba arkadaşlar

Firemonkey de idhttp ile dosya indiriyorum fakat work end eventı iki kere çalışıyor.

Hem bitmeden hemde bittikten sonra.

Kod: Tümünü seç

      TThread.CreateAnonymousThread(
      procedure
      var
          ms : TMemoryStream;
      begin
         ms:=TMemoryStream.Create;
         sHTTP.Get('https://api.soundcloud.com/tracks/'+lstDown.ListItems[sIndex - 1].ItemData.Detail +
                   '/stream?client_id=9a9c7c875b0ab4d0c254ccc9a14c61e4',ms);
         ms.Seek(0,0);
         if not DirectoryExists(TPath.GetSharedMusicPath + PathDelim + 'Extremity')   then
                CreateDir(TPath.GetSharedMusicPath + PathDelim + 'Extremity');

         ms.SaveToFile(TPath.GetSharedMusicPath + PathDelim + 'Extremity' +PathDelim + lstDown.Items[sIndex - 1] + '.mp3');
         ms.Free;
      end).Start;
Kodlarım bu şekilde.
Cevapla