2006/7/18, bobby <[EMAIL PROTECTED]>:
At the moment all the parsers are in the main unit, and I don't see a way
to get them sorted like one parser = one unit, or eventually to get them in
the future to one parser = one dll.
The way it is done right now is not going toward a DLL... but if for
now you want the function inside the same unit (not main unit),
simply:
- move your function to another unit;
- pass the TStringGrid object to the function
- do your job.
procedure parKAV45Parser(FileName: string; dlmt: string; StringGrid1:
TStringGrid);
This will do the job. But don't forget the Begin/End Update:
StringGrid1.BeginUpdate;
StringGrid1.RowCount := Lista.Count +1; //enough space for sure, the
unused space is deleted at the end of this code
...
StringGrid1.EndUpdate;
If you exit the procedure before the end of the procedure, make sure
to call EndUpdate.
The parser per-se is not slow, it parse 70mb file in less than 20 seconds.
The problem is that I want it out of main unit. Thats why I had a request of
simple class that can mimic StringGrid.
That way, you don't need the simple class (for now).
Hope this helpsĀ.
--
Alexandre Leclerc
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives