or IncludeTrailingBackSlash if VCL only or D5 or less
----- Original Message -----
From: Andreas Toth <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Friday, October 25, 2002 9:35 AM
Subject: RE: [DUG]: A Friday poser


> Tip: Your AppendSlash method can be replaced by the SysUtils function
> IncludeTrailingPathDelimiter.
>
>
> -Andreas
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:owner-delphi@;delphi.org.nz]On
> Behalf Of Alistair George
> Sent: Friday, 25 October 2002 08:39
> To: Multiple recipients of list delphi
> Subject: [DUG]: A Friday poser
>
>
> Thanks folks for the input on 'Is this bad programming practice or what?'
I
> settled for the
> following which 'should' be OK:
>   for tval := 0 to memo1.Lines.Count - 1 do
>   begin
>     with memo1.Lines do
>     begin
>       if (directoryexists(strings[tval])) then file://its DEFINITELY a
directory
>         strings[tval] := ZipMaster1.AppendSlash(strings[tval]) + '*.*';
>     end;
>   end;
>
>
> BUT after doing that I was getting all kinds of weird strings out of  the
> result
> not attributable to ZipMaster1.AppendSlash.
> Oh, programming is so rewarding, I sussed it out in no time which usually
> would
> take me a day!
>
> If you want to cheat or simply not interested in the answer go straight to
> the
> answer at this message bottom. Otherwise sus it out yourself.
> Answer below.........
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> The gotcha was in Tmemo - apparently 'wordwrap' is turned on by default. I
> assume the wrap drops in ASCII13 (CR) resulting in the parsing being
> correct,
> but giving erroneous strings. wordwrap:=false fixed the nasty.
> Al+
>
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to