You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Peter Warren (JIRA)" <ji...@apache.org> on 2012/10/02 02:01:07 UTC

[jira] [Created] (CB-1566) SetMetaData on folder not working

Peter Warren created CB-1566:
--------------------------------

             Summary: SetMetaData on folder not working
                 Key: CB-1566
                 URL: https://issues.apache.org/jira/browse/CB-1566
             Project: Apache Cordova
          Issue Type: Bug
          Components: iOS
    Affects Versions: 2.1.0
            Reporter: Peter Warren
            Assignee: Shazron Abdullah


Copied code from 2.1 docs (setFolderMetadata)

http://docs.phonegap.com/en/2.1.0/cordova_file_file.md.html#Metadata

console output "error setting metadata Error"
Line 538 of CDVFile.m fails to retrieve attribute value even though the correct value was passed in to the (js)function call.
NSDictionary* options= [command.arguments objectAtIndex:1 withDefault:nil]



--
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

[jira] [Comment Edited] (CB-1566) SetMetaData on folder not working

Posted by "Becky Gibson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13469507#comment-13469507 ] 

Becky Gibson edited comment on CB-1566 at 10/5/12 3:59 AM:
-----------------------------------------------------------

The problem is the creation of the object that is passed in the options parameter. With the code in the example (http://stackoverflow.com/questions/3153969/create-object-using-variables-for-property-name) the key is actually set as "metadataKey" and not the value of the variable by that name.  See http://stackoverflow.com/questions/3153969/create-object-using-variables-for-property-name

this corrects it: 
var onGetDirectoryWin = function(parent) {
                    var dataObj = {};
                    dataObj[metadataKey] = metadataValue;
                    parent.setMetadata(onSetMetadataWin, onSetMetadataFail, dataObj);
                }

                
      was (Author: becka11y):
    The problem is the creation of the object that is passed in the options parameter. With the code in the example the key is actually set as "metadataKey" and not the value of the variable by that name.  See http://docs.phonegap.com/en/2.1.0/cordova_file_file.md.html#DirectoryEntry_setmetadata

this corrects it: 
var onGetDirectoryWin = function(parent) {
                    var dataObj = {};
                    dataObj[metadataKey] = metadataValue;
                    parent.setMetadata(onSetMetadataWin, onSetMetadataFail, dataObj);
                }


                  
> SetMetaData on folder not working
> ---------------------------------
>
>                 Key: CB-1566
>                 URL: https://issues.apache.org/jira/browse/CB-1566
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>            Reporter: Peter Warren
>            Assignee: Shazron Abdullah
>
> Copied code from 2.1 docs (setFolderMetadata)
> http://docs.phonegap.com/en/2.1.0/cordova_file_file.md.html#Metadata
> console output "error setting metadata Error"
> Line 538 of CDVFile.m fails to retrieve attribute value even though the correct value was passed in to the (js)function call.
> NSDictionary* options= [command.arguments objectAtIndex:1 withDefault:nil]

--
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

[jira] [Assigned] (CB-1566) SetMetaData on folder not working

Posted by "Becky Gibson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Becky Gibson reassigned CB-1566:
--------------------------------

    Assignee: Becky Gibson  (was: Shazron Abdullah)
    
> SetMetaData on folder not working
> ---------------------------------
>
>                 Key: CB-1566
>                 URL: https://issues.apache.org/jira/browse/CB-1566
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>            Reporter: Peter Warren
>            Assignee: Becky Gibson
>
> Copied code from 2.1 docs (setFolderMetadata)
> http://docs.phonegap.com/en/2.1.0/cordova_file_file.md.html#Metadata
> console output "error setting metadata Error"
> Line 538 of CDVFile.m fails to retrieve attribute value even though the correct value was passed in to the (js)function call.
> NSDictionary* options= [command.arguments objectAtIndex:1 withDefault:nil]

--
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

[jira] [Commented] (CB-1566) SetMetaData on folder not working

Posted by "Becky Gibson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13469507#comment-13469507 ] 

Becky Gibson commented on CB-1566:
----------------------------------

The problem is the creation of the object that is passed in the options parameter. With the code in the example the key is actually set as "metadataKey" and not the value of the variable by that name.  See http://docs.phonegap.com/en/2.1.0/cordova_file_file.md.html#DirectoryEntry_setmetadata

this corrects it: 
var onGetDirectoryWin = function(parent) {
                    var dataObj = {};
                    dataObj[metadataKey] = metadataValue;
                    parent.setMetadata(onSetMetadataWin, onSetMetadataFail, dataObj);
                }


                
> SetMetaData on folder not working
> ---------------------------------
>
>                 Key: CB-1566
>                 URL: https://issues.apache.org/jira/browse/CB-1566
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>            Reporter: Peter Warren
>            Assignee: Shazron Abdullah
>
> Copied code from 2.1 docs (setFolderMetadata)
> http://docs.phonegap.com/en/2.1.0/cordova_file_file.md.html#Metadata
> console output "error setting metadata Error"
> Line 538 of CDVFile.m fails to retrieve attribute value even though the correct value was passed in to the (js)function call.
> NSDictionary* options= [command.arguments objectAtIndex:1 withDefault:nil]

--
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

[jira] [Resolved] (CB-1566) SetMetaData on folder not working

Posted by "Becky Gibson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Becky Gibson resolved CB-1566.
------------------------------

       Resolution: Not A Problem
    Fix Version/s: 2.1.0

This is really a doc issue - ticket 1586 filed.
                
> SetMetaData on folder not working
> ---------------------------------
>
>                 Key: CB-1566
>                 URL: https://issues.apache.org/jira/browse/CB-1566
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>            Reporter: Peter Warren
>            Assignee: Becky Gibson
>             Fix For: 2.1.0
>
>
> Copied code from 2.1 docs (setFolderMetadata)
> http://docs.phonegap.com/en/2.1.0/cordova_file_file.md.html#Metadata
> console output "error setting metadata Error"
> Line 538 of CDVFile.m fails to retrieve attribute value even though the correct value was passed in to the (js)function call.
> NSDictionary* options= [command.arguments objectAtIndex:1 withDefault:nil]

--
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

[jira] [Commented] (CB-1566) SetMetaData on folder not working

Posted by "Peter Warren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13469839#comment-13469839 ] 

Peter Warren commented on CB-1566:
----------------------------------

Yes, that fixes it. Thanks Becky.
                
> SetMetaData on folder not working
> ---------------------------------
>
>                 Key: CB-1566
>                 URL: https://issues.apache.org/jira/browse/CB-1566
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>            Reporter: Peter Warren
>            Assignee: Shazron Abdullah
>
> Copied code from 2.1 docs (setFolderMetadata)
> http://docs.phonegap.com/en/2.1.0/cordova_file_file.md.html#Metadata
> console output "error setting metadata Error"
> Line 538 of CDVFile.m fails to retrieve attribute value even though the correct value was passed in to the (js)function call.
> NSDictionary* options= [command.arguments objectAtIndex:1 withDefault:nil]

--
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