procedure TfMain.FormShow(Sender: TObject);
begin
Timer1.Enabled := True;
end;
procedure TfMain.Timer1Timer(Sender: TObject);
begin
Timer1.Enabled := False;
Caption := 'Loading data. Please wait...';
BlockSize := GetRecordCount(ExtractFilePath(Application.ExeName) + 'klax.dat');
if BlockSize = 0 then
begin
ShowMessage('Error loading file.');
Exit;
end;
//...
end;
Shouldn't TfMain.FormShow
make the call:
Timer1Timer(NIL);
Under the debugger Timer1Timer is not executed.
I'm getting an out of bounds error on line 114. Which makes no sense because it is a beginstatement but I think from the description it is really a few lines down down that reads 'Reset(DataFile); ' So I'm trying to run that down.
I don't understand the array declaration and set up.
At first I thought there were 3 arrays declared in the program.
The line PData = ^TData; What dose the ^ do. Have to run that down. but this is the record definition not an array, I understand that.
Then we have under global variables two arrays:
var
Data: array of TData; // array of records
DataCondition : array of TData; // array of the data
Thus where do I set length on the arrays.
I don't have a problem posting my code if it will help. I have made very few changes.
I would like to understand what I'm doing and not take and use without knowledge. I believe we are trying to pack the data strings in the records, but not sure. You guys are so quick and it's difficult for me to keep up at times.
So when new to me ideas come in I have to do the research, sometimes write a demo and be able to say, Oh that's how that works. Not complaining. Have a whole library of 264 sub directories of examples and a program that will bring up the text files of the demo's.