any body have a suitable thread timer component for xe5?

jstjst

New member
Joined
Jan 18, 2010
Messages
2
Reaction score
0
any body have a suitable thread timer component for xe5?
 

sikancil

Member
Joined
Oct 20, 2011
Messages
17
Reaction score
0
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.. :)
 
Top