Try/Catch changes the scope, so you did not see the object outside it. Do this way:
>>XceedZipLib.XceedZipClass loZipper;
>try
>{
> loZipper = new XceedZipLib.XceedZipClass();
>}
>catch
>{
> MessageBox.Show("Please check to make sure you have the Xceed Zip Compression Library installed",
> "Error: Missing Required Files", MessageBoxButtons.OK, MessageBoxIcon.Stop);
>
> return false;
>}
>
>loZipper.PreservePaths = false;
>loZipper.FilesToProcess = ...
>
Hi Plamen,
Ok, when I do that I get the following:
A local variable named 'loZipper' cannot be declared in this scope because it would give a different meaning to 'loZipper', which is already used in a 'parent or current' scope to denote something else.
Yes, both declarations are of the same type, so it works. However, it's curious why there doesn't seem to be a "clean" way to do this.
- Brian
VFP6 SP5, VFP8 SP1, VFP 9 SP 1 and Win XP SP 3 (unless otherwise specified)
www.wulfsden.com