Bug? UnZipDone event not triggered

Alessandro71

Well-Known Member
Licensed User
Longtime User
in the attached B4J test project, the UnZipDone event is not triggered, but the zip file is processed correctly (UnZipProgression event is correctly triggered for every file)

bug or something really big i'm missing?
 

Attachments

  • ZipBug.zip
    4.3 KB · Views: 73

DonManfred

Expert
Licensed User
Longtime User
something really big i'm missing?
Unzip is an Synchronous method.

change
B4X:
    arc.UnZip(xui.DefaultFolder, "Files.zip", File.Combine(xui.DefaultFolder, unzipdirname), "UnzipFiles")

to

B4X:
    arc.AsyncUnZip(xui.DefaultFolder, "Files.zip", File.Combine(xui.DefaultFolder, unzipdirname), "UnzipFiles")

and everything will work

Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
unzip 1 - D:\AppData\Roaming\ZipBug\files/2.txt
unzip 2 - D:\AppData\Roaming\ZipBug\files/1.txt
unzip finished true - 2
 

Alessandro71

Well-Known Member
Licensed User
Longtime User
So it was "something really big" I was missing...
The progression events being generated even for a synchronous call mislead me thinking it was an asynchronous call.
Thank you
 
Top