Hi Andreas,

Looking at the API tells me that the set function of qooxdoo objects is also 
available with two parameters, not only with one map. First one as string 
declares the property to set and the second one is the value.
So I think your code should look like this:

for( var i = 0, len = arr.length; i<len; i++ )
    widget.set(arr[i][0], arr[i][1]};  // 0 = name, 1 = value
}

Regards,
Andreas

> -----Ursprüngliche Nachricht-----
> Von: Andreas G. [mailto:[email protected]]
> Gesendet: Mittwoch, 10. Februar 2010 16:00
> An: [email protected]
> Betreff: [qooxdoo-devel] implicit type conversion
> 
> 
> hello guys!
> 
> we ran into this problem today and can not find any (clean) solution right
> now. we create an array of attributes (defined in an xml-file) and would
> like to set object-properties dynamically.
> 
> var arr = [];
> 
> ...
> 
> for( var i = 0, len = arr.length; i<len; i++ )
> {
>     widget.set( { arr[i][0] : arr[i][1] } );  // 0 = name, 1 = value
> }
> 
> ...
> 
> both, name and value, are strings. is there any clean solution to do
> implicit type conversion?
> --
> View this message in context: http://n2.nabble.com/implicit-type-conversion-
> tp4548364p4548364.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to