any body have a suitable thread timer component for xe5?

jstjst

Турист
Регистрация
18 Янв 2010
Сообщения
2
Реакции
0
Credits
2
any body have a suitable thread timer component for xe5?
 

MonsterKFX

Banned
BANNED
Регистрация
18 Окт 2011
Сообщения
1
Реакции
0
Credits
0
What seems to be the problem with the default timer ?
 

sikancil

Турист
Регистрация
20 Окт 2011
Сообщения
17
Реакции
0
Credits
34
for XE5-XE6, check this maybe could help you much..
C:\Users\Public\Documents\Embarcadero\Studio\XX.0\Samples\Object Pascal\RTL\CrossPlatform Utils\AnonThread.pas

And use sample in:
C:\Users\Public\Documents\Embarcadero\Studio\XX.0\Samples\Object Pascal\RTL\CrossPlatform Utils\AnonymousThread\AnonymousThread.dproj

Or you can use std TThread from System.Classes like:

uses System.Classes;

implementation

procedure TForm1.Form1Show(AObject: TObject);
var
tmpProc: TThread;
begin
tmpProc := TThread.CreateAnonymousThread(
procedure
var
i: integer;
begin
for i:=0 to someLength-1 do
Memo1.Lines.Add('Hey, Mr.#' + inttostr(i) + ' how are you?');

//-- dont forget to clear it out after the thread process sure finished the task.
procPrepareHttpData.WaitFor;
procPrepareHttpData.Free;
end
);
//-- start the process task, if it have not started yet..
if (tmpProc.Started = false) then tmpProc.Start;
end;

You can also implement and put TThread process inside a TTimer in specific time to launch it or repeatly. This good enough for FMX on iOS to use TRestClient or other Async Process.
Not sure this help your idea/problem or not.. :)