PDA

View Full Version : Ziping the files


Nagesh
12-05-2005, 09:24 AM
Hi

I am able to zip the files using zip.add method. but when i used callback function it is not firing at all. Please help me .


Nagesh

Brett
12-05-2005, 09:24 AM
Please post your script so that we can see what you have tried so far.

Nagesh
12-05-2005, 10:02 AM
Please post your script so that we can see what you have tried so far.

I used code like this . the code is not working at all. Can you give me any clue
or any suggestin how to resolve this isssue

Nagesh

Zip.Add(_zipPath, tblFiles, true, "", 5, ZipCallback, true)
function ZipCallback(Message, Percent, Mode)

if(screen_globals.Cancelled) then
return false;
end

Dialog.Message("", "zipping");

if (Mode==ZIP_STATUS_MAJOR) then
-- Update the major status (the whole zip file's status)
DlgStaticText.SetProperties(CTRL_STATICTEXT_LABEL_ 01, {Text="zipping"});
DlgProgressBar.SetPos(CTRL_PROGRESS_BAR_01, Percent);
else
-- Update the minor status (the status of the current file being zipped)
DlgStaticText.SetProperties(CTRL_STATICTEXT_LABEL_ 02, {Text="zipped"});
DlgProgressBar.SetPos(CTRL_PROGRESS_BAR_01, Percent);
end
error = Application.GetLastError();
Dialog.Message("", _tblErrorMessages[error]);

return true;
end

Mark
12-05-2005, 10:11 AM
Hi Nagesh,

Try putting the call to Zip.Add() after your function. Since you are defining ZipCallback after the call to Zip.Add(), ZipCallback does not exist at the time you call Zip.Add().

Nagesh
12-05-2005, 10:26 AM
Thanks

Nagesh