aseps3472 / gdata-javascript-client

Automatically exported from code.google.com/p/gdata-javascript-client
0 stars 0 forks source link

Problem with UserDefinedFields() #22

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
 am using the Javascript Contacts API.  Version as follows:

google.load('gdata', '2.x', { packages : ['contacts'] });

I make the following call
var userFields = new Array();
var userField1 = new google.gdata.contacts.UserDefinedField();
userField1.setValue('value1');
userField1.setKey('Key1');
userFields[0] = userField1;
entry.setUserDefinedFields(userFields);

and I get an error about the property hb being unknown.  I look at the 
userField1 object and I can see the hb variable.  However, the documentation 
says that the variable should be called key.  I change the code to this:

var userFields = new Array();
var userField1 = new google.gdata.contacts.UserDefinedField();
userField1.setValue('value1');
userField1.key = 'Key1';
userFields[0] = userField1;
entry.setUserDefinedFields(userFields);

and everything works just fine.

I believe that the google.gdata.contacts.UserDefinedField.SetKey() is setting 
the wrong variable.

thanks,

Scott Schmitz

Original issue reported on code.google.com by wildtest...@gmail.com on 15 Jul 2010 at 3:26