Darn, just answered my own question.
The proper syntax for revZipAddUncompressedItemWithFile does not include quotes
around the variable name, like revZipAddItemWithData. So in my example below,
it would be:
revZipAddUncompressedItemWithFile tPath, tFileName, tFilePath
(as you might expect).
In my actual application I mistakenly left out the line:
revZipCloseArchive tPath
Since I was not closing the archive, and the changes don't take effect until
it's closed, I wasn't seeing the changes in the archive, and assumed I had the
syntax for revZipAddUncompressedItemWithFile incorrect.
All fine now!
Nothing to see here... move along, move along...
Cheers,
- Charles
On 17 Jul 2014, at 9:32 PM, Charles E Buchwald <[email protected]> wrote:
> I am having some challenges using revZipAddUncompressedItemWithFile.
> I'm not having trouble with any other handlers reading or writing to the zip
> archive, just this one.
> Here's a sample bit of code:
>
> command SaveIssue
> put field "Archive Path" into tPath
> ask file "Save as:" with "someimage.jpg"
> put it into tFilePath
> set itemDelimiter to slash
> put item -1 of tFilePath into tFileName
> revZipOpenArchive tPath, "update"
> revZipAddUncompressedItemWithFile tPath, tFileName, "tFilePath"
> revZipCloseArchive tPath
> end SaveIssue
>
> FYI, this is just after finding an error, or at least a confusing bit, in the
> documentation for revZipAddItemWithData. If you are curious, you have to put
> quotes around a variable name in the 3rd argument, like this:
> revZipAddItemWithData tPath, "issue.xml", "tXML"
>
> Does anyone know if the revZipAddUncompressedItemWithFile is similar?
> I've tried every combination of quotes around variable names in the
> arguments, to no avail.
>
> Using LiveCode 6.6.2 stable, Mac OSX 10.9.4
> --
> Charles E. Buchwald
> CEO/Director General
> Museografica Digital
> http://digital.museografica.com
>
> LC Developer Tools: http://buchwald.ca/developer-tools/
>
> Email Notice: http://wp.me/P3aT4d-33
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode