I am developing an iOS app using Appcelerator. I got a table and on each row I got a property that holds the index for that row (position: i). I am sending this property along into the edit window so that I can update the data array.
I really would like to use the code below to specify exactly what I wan开发者_如何学运维t to update in the array but if I take the property from previous window and inserting it in the square brackets I get errors. I suspect it has something to do with integers and strings.
This code works, but is hardcoded:
data.emails[0].email.desc = desc.textfield.value;
I would like to use this:
data.emails[window.position].email.desc = desc.textfield.value;
How can I achieve this?
精彩评论