I can confirm the same result- global seems to be reporting item.

With a brand new stack, this script:

on doIt
    revZipSetProgressCallback "myZipProgressHandler"
    answer file "find zip"
    put it into tArchive
    revZipOpenArchive tArchive, "read"
    put revZipEnumerateItems(tArchive) into tItems
    breakpoint
    repeat for each line tFile in tItems
        revZipExtractItemToFile tArchive, tFile, "/" & tFile
    end repeat
    pGlobalProgress
    revZipCloseArchive tArchive
end doIt


on myZipProgressHandler pArchive, pItem, pType, pItemProgress, pItemTotal, pGlobalProgress, pGlobalTotal
    if the endValueSet of scrollbar "dlProgress" <> "true" then
        set the endvalue of scrollbar "dlProgress" to pItemTotal
        set the endValueSet of scrollbar "dlProgress" to true
    end IF
    set the thumbpos of scrollbar "dlProgress" to pItemProgress
    if pItemProgress = pItemTotal then
        set the endValueSet of scrollbar "dlProgress" to false
    end IF
end myZipProgressHandler


produces the expected result - the scrollbar repeats as each item is extracted.

However, when changing all

pItemTotal to pGlobalTotal

and all

pItemProgress to pGlobalProgress


results are identical.


As you say, with the global values I would expect the pGlobalTotal number to reflect the total archive size, and the pGlobalProgress to reflect progress of extracting the entire archive...

A bug? Or is there another syntax that produces the desired result?


On Sep 27, 2007, at 11:32 PM, Scott Rossi wrote:

Anyone have experience with the new ZIP library -- specifically the
revZipSetProgressCallback command?

The docs say a callback is sent with several parameters, including
pGlobalProgress. But the value of this parameter appears to be identical to the value of pItemProgress. I expected "global" to mean the progress of the decompressing an entire archive, and "item" refering to individual files
within the archive.

Can anyone shed any light on this?

Thanks & Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to