I'm working on updating a client's project for 64bit compatibility on
the Mac side.
The project is a menu app that downloads and unzips a number of modules
from a server. The previous version, done in LiveCode 7, saved &
unzipped the modules in the app bundle, at
/Contents/Resources/_MacOS/Modules (that last item is a folder created
by the app).
This wasn't working when I opened it in LiveCode 9, so I tweaked the
code to use
specialFolderPath("resources") & slash & "Modules/"
The folder is created and downloaded zip files are saved there as
expected, but there seems to be a problem extracting it.
I'm trying to follow the steps at
http://lessons.livecode.com/m/2592/l/126625-zip-tool . It gets as far as
starting the listZipContents handler, then gives a blank window
"Execution Error" with a close button. Immediately after
revZipOpenArchive I have "answer the result" which never shows, so it
seems to be a problem with revZipOpenArchive?
I'm just feeling my way here... any thoughts on what's going wrong? In
case it matters: each zipped file is a folder that contains a LiveCode
stack and a subfolder "media" containing some mp3 files.
My clumsy debugging code:
-- lists the content of an archive pArchive
on listZipContents pArchive
if the controlKey is down then
answer "starting listZipContents, pArchive is" && pArchive
end if
--IT SEEMS TO FAIL HERE
revZipOpenArchive pArchive, "read"
if the controlKey is down then
answer the result
end if
if the controlKey is down then
answer "just did revZipOpenArchive"
end if
local tZipContents
put revZipEnumerateItems(pArchive) into tZipContents
put tZipContents into field "FileList"
if the controlKey is down then
answer "about to do revZipCloseArchive"
end if
revZipCloseArchive pArchive
if the controlKey is down then
answer "just did revZipCloseArchive"
end if
end listZipContents
-Curt
--
Sent from Postbox
<https://www.postbox-inc.com/?utm_source=email&utm_medium=siglink&utm_campaign=reach>
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode