BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Zipforge problem

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (General)
View previous topic :: View next topic  
Author Message
Erik Bellaard
Guest





PostPosted: Mon Jul 25, 2005 7:03 pm    Post subject: Zipforge problem Reply with quote



Hi,

I am using ther zipforge component and I am having a little problem:

I have the following code:

with zipforge1 do
begin
OpenArchive(fmCreate);
BaseDir := sDatadir;
AddFiles('*.*');
if Checkbox1.Checked then
begin
ExclusionMasks.Add('Foto.DAT');
ExclusionMasks.Add('Foto.IDX');
ExclusionMasks.Add('Foto.BLB');
end;
CloseArchive;
end;

what state the checkbox1 has (checked of not-checked), the 3 foto-files will
allways be in the zipfile.

what do I do wrong, and how should it be done ?

any suggestions ?

regards and thanks in advance....


Erik


Back to top
Magnus
Guest





PostPosted: Tue Jul 26, 2005 6:41 am    Post subject: Re: Zipforge problem Reply with quote



Erik Bellaard wrote:

Quote:
I am using ther zipforge component and I am having a little problem:
[...]
what state the checkbox1 has (checked of not-checked), the 3 foto-files will
allways be in the zipfile.

what do I do wrong, and how should it be done ?

Without knowing ZipForge, two things look suspicious:
- is it necessary to put a backslash before the filename?
- you should first fill the ExclusionMasks-list and then call the
AddFiles-method

Just wild guesses... :-)

Quote:
Erik


--
Magnus

Back to top
Danijel Tkalcec (RealThin
Guest





PostPosted: Tue Jul 26, 2005 8:39 am    Post subject: Re: Zipforge problem Reply with quote



Try it like this ...

with zipforge1 do
begin
OpenArchive(fmCreate);
BaseDir := sDatadir;
// first, define the Exclusion mask ...
if Checkbox1.Checked then
begin
ExclusionMasks.Add('Foto.DAT');
ExclusionMasks.Add('Foto.IDX');
ExclusionMasks.Add('Foto.BLB');
end;
AddFiles('*.*'); // AddFiles only _after_ you defined your
ExclusionMasks.
CloseArchive;
end;

--
Danijel Tkalcec

RealThinClient Components
http://www.realthinclient.com


Back to top
Erik Bellaard
Guest





PostPosted: Wed Jul 27, 2005 6:56 am    Post subject: Re: Zipforge problem Reply with quote

Hi,

I tried that with no (good) result.
I also tried to set a password on a file, but that also did not work...

with zipforge1 do
begin
OpenArchive(fmCreate);
BaseDir := sDatadir;
Pasword := 'test';
// first, define the Exclusion mask ...
if Checkbox1.Checked then
begin
ExclusionMasks.Add('Foto.*');
end;
AddFiles('*.*'); // AddFiles only _after_ you defined your
ExclusionMasks.
CloseArchive;
end;


Erik

"Danijel Tkalcec (RealThinClient)" <dtkalcec (AT) hotmail (DOT) com> schreef in bericht
news:42e5f6dd (AT) newsgroups (DOT) borland.com...
Quote:
Try it like this ...

with zipforge1 do
begin
OpenArchive(fmCreate);
BaseDir := sDatadir;
// first, define the Exclusion mask ...
if Checkbox1.Checked then
begin
ExclusionMasks.Add('Foto.DAT');
ExclusionMasks.Add('Foto.IDX');
ExclusionMasks.Add('Foto.BLB');
end;
AddFiles('*.*'); // AddFiles only _after_ you defined your
ExclusionMasks.
CloseArchive;
end;

--
Danijel Tkalcec

RealThinClient Components
http://www.realthinclient.com




Back to top
Danijel Tkalcec (RealThin
Guest





PostPosted: Wed Jul 27, 2005 12:09 pm    Post subject: Re: Zipforge problem Reply with quote

Maybe the problem is the "" before the file name.

Did you try changing this line ...
Quote:
ExclusionMasks.Add('Foto.*');
into this ?
ExclusionMasks.Add('Foto.*'); // no "" before Foto.*.

--
Danijel Tkalcec

RealThinClient Components
http://www.realthinclient.com



Back to top
Danijel Tkalcec (RealThin
Guest





PostPosted: Wed Jul 27, 2005 12:14 pm    Post subject: Re: Zipforge problem Reply with quote

Btw ... did you try contacting ComponentAce for support? Since this is their
component, I think they are the right address for all questions regarding
ZipForge. The rest of us can only guess where the problem might be.

--
Danijel Tkalcec

RealThinClient Components
http://www.realthinclient.com


Back to top
Erik Bellaard
Guest





PostPosted: Thu Jul 28, 2005 1:16 pm    Post subject: Re: Zipforge problem Reply with quote

Hi,

I had a very quick responce from componentAce (I mailed with Kevin) and I
have the following solution:

with zipforge1 do
begin
OpenArchive(fmCreate);
BaseDir := sDatadir;
FileMasks.Add('*.*');
if Checkbox1.Checked then
begin
ExclusionMasks.Add('Foto.*');
end;
AddFiles;
CloseArchive;
end;

and this solved my problem.

Kevin mailed me:

*** START TEXT ***
ExclusionMasks are used only when you call AddFiles without parameters:
ZipForge.FileMasks.Add(...);
ZipForge.ExclusionMasks.Add(...);
ZipForge.AddFiles;
When you call AddFiles with FileMask parameter, you must specify
ExclusionMask parameter as well:
procedure AddFiles(FileMask: String;SearchAttr: Word =
faAnyFile-faDirectory;ExclusionMask: String = ''); overload;

Example:
ZipForge.AddFiles('*.*', faAnyFile, 'Foto.*');
*** END TEXT ***


Kind regards and thanks for anyone who tried to give me a solution...

Erik


Back to top
Magnus
Guest





PostPosted: Thu Jul 28, 2005 2:34 pm    Post subject: Re: Zipforge problem Reply with quote

Erik Bellaard wrote:
Quote:
Hi,

I had a very quick responce from componentAce (I mailed with Kevin) and I
have the following solution:

So 2 days after my wild guesses which turned out to be correct you came
to the same solution...



--
Magnus

Back to top
Danijel Tkalcec (RealThin
Guest





PostPosted: Thu Jul 28, 2005 3:18 pm    Post subject: Re: Zipforge problem Reply with quote

I'd say that contacting support is always the right thing to do. A wild
guess, even if it does work at the end, remains only a wild guess. And
there's a small difference between coding based on guessing and coding based
on contacting support or reading manuals.

--
Danijel Tkalcec

RealThinClient Components
http://www.realthinclient.com


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (General) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.