[
https://issues.apache.org/jira/browse/CB-1586?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shazron Abdullah reassigned CB-1586:
------------------------------------
Assignee: Shazron Abdullah (was: Michael Brooks)
> iOS Entry.setMetaData example is incorrect
> ------------------------------------------
>
> Key: CB-1586
> URL: https://issues.apache.org/jira/browse/CB-1586
> Project: Apache Cordova
> Issue Type: Bug
> Components: Docs
> Affects Versions: 2.1.0
> Reporter: Becky Gibson
> Assignee: Shazron Abdullah
> Fix For: 2.2.0
>
>
> See the long iOS example here:
> http://docs.phonegap.com/en/2.1.0/cordova_file_file.md.html#FileEntry_setmetadata.
> The DirectoryEntry example also needs to be fixed.
> Need to modify this function in the example in order for it to work correctly:
> ORIGINAL:
> var onGetFileWin = function(parent) {
> parent.setMetadata(onSetMetadataWin, onSetMetadataFail, { metadataKey:
> metadataValue});
> }
> FIXED:
> var onGetDirectoryWin = function(parent) {
> var dataObj = {};
> dataObj[metadataKey] = metadataValue;
> parent.setMetadata(onSetMetadataWin, onSetMetadataFail, dataObj);
> }
> otherwise the object gets set with "metadataKey" as the name rather than the
> value of metadataKey variable.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira