DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


OnPercentDone

Declaration: TMatrix.OnPercentDone: TOnPercentDoneEvent;
{ TOnPercentDoneEvent = procedure (Sender: TObject; PercentDone: integer; }
The event OnPercentDone occurs when the component either reads or writes binary data. In particular, the following methods generate an OnPercentDone event:
LoadBinary, SaveBinary

Example: The following small program shows how to use the OnPercentDone event. Both the function SaveBinary and LoadBinary trigger the OnPercentDone event. The event handler simply displays the percentage of completion by adjusting the progress DataLab bar (callt to ShowStatus):

program MatrixOnPercDone;

procedure MyMatOnPercentDoneEvent (Sender: TObject; PercentDone: integer);

begin
ShowStatus ('processing matrix...', PercentDone);
Application.ProcessMessages;
end;

var
  MyMat : TMatrix;

begin
MyMat := TMatrix.Create (nil);
MyMat.Resize (10000,5000);
MyMat.Fill (0,0,0,0,100);
MyMat.OnPercentDone := @MyMatOnPercentDoneEvent;
MyMat.SaveBinary ('c:\temp\mymat.bin');
MyMat.Fill (0,0,0,0,0);
MyMat.LoadBinary ('c:\temp\mymat.bin');
MyMat.OnPercentDone := nil;
MyMat.Free;
end.