Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2009-08

[PATCH] patch to allow TUnzipper to load it's zip file from wherever

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrew Haines

Hi,

This patch allows TUnzipper to load it's file from any TStream descendant instead of only using a FileName to load a zip stream.

Regards,

Andrew Haines

Reply by email

Graeme Geldenhuys
to Andrew Haines

Andrew Haines wrote:

==================
@@ -377,15 +378,17 @@

    TUnZipper = Class(TObject)
    Private
+    FOnCloseInputStream: TOpenStreamEvent;
      FOnCreateStream: TOnCustomStreamEvent;
      FOnDoneStream: TOnCustomStreamEvent;
+    FOnOpenInputStream: TOpenStreamEvent;
==================

I would suggest you find a more generic name for the event type. Having a TOpenStreamEvent for a OnCloseInputStream doesn't sound right, and can lead to confusion months down the line when somebody else looks at the code.

If you want to use the event type for both OnClose... and OnOpen... then maybe you should change that event type name to TInputStreamEvent or something like that. Or create two event types - one for each event, even though there signature is the same.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 21 lines
Andrew Haines wrote: ================== @@ -377,15 +378,17 @@ TUnZipper = Class(TObject) Private + FOnCloseInputStream: TOpenStreamEvent; FOnCreateStream: TOnCustomStreamEvent; FOnDoneStream: TOnCustomStreamEvent; + FOnOpenInputStream: TOpenStreamEvent; ================== I would suggest you find a more generic name for the event type. Having a TOpenStreamEvent for a OnCloseInputStream doesn't sound right, and can lead to confusion months down the line when somebody else looks at the code. If you want to use the event type for both OnClose... and OnOpen... then maybe you should change that event type name to TInputStreamEvent or something like that. Or create two event types - one for each event, even though there signature is the same.

I'll handle that prior to committing the patch.

Michael.

Reply by email