[delphizip] Bugfix - Demos

  • From: Daniel Marschall <uni@xxxxxxxxxxxxxxxxxxx>
  • To: delphizip@xxxxxxxxxxxxx
  • Date: Sun, 26 Sep 2010 20:59:18 +0200

Hello,


(I have tested all Demos under Win95 and Delphi 6. DelphiZip and DLL 
W95-hotfixed.)

============================================================

Demo #1
-------

Procedure TMainform.FormResize(Sender: TObject);
Begin
  If Width - 291 > 0 Then
    ZipFName.Width := Width - 291
  Else
    ZipFName.Width := 0;
  SetZipFName(ZipMaster1.ZipFilename, False); // AV
End;

SetZipFName() throws an AV. I do not think that this line belongs into 
FormResize(). I commented it out.

============================================================

Demo #6
-------

procedure TMainForm.FillGrid;
var
  i: Integer;
begin
  with StringGrid1 do
  begin
    { remove everything from grid except col titles }
    RowCount := 2; // AV

RowCount := 2 throws an AV directly after starting the EXE. The component is 
not jet ready. FillGrid was called by ZipMaster1DirUpdate directly after EXE 
startup. (Maybe in older versions of DelphiZip there were no invoke of 
DirUpdate directly at the init process, so this Demo WAS working)

SOLUTION:

1. Delete ZipMaster1.OnDirUpdate event from DFM.

2. In TMainForm.FormCreate() find

   if ParamCount > 0 then
     ZipMaster1.ZipFilename := ParamStr( 1 );

and append

   ZipMaster1.OnDirUpdate := ZipMaster1DirUpdate;

after it.

============================================================

Demo #8
-------

What is that? No project file? And the reference to "Demos\TZipSFX18\SFXDemo2" 
seems to be old. I do now know what this Demo should show. Without BPR I cannot 
compile.

============================================================

PS: You should consider stripping Explicit* attributes of TPanel from your DFMs 
since it is not compatible with older versions of Delphi.

Maybe it would be also nice to link to "..\SortGrid\" in the BPR, so that the 
Demos are directly working.


Regards
Daniel Marschall


-----------
To unsubscribe from this list, send an empty e-mail 
message to:
  delphizip-request@xxxxxxxxxxxxx 
and put the word unsubscribe in the subject.

Other related posts: