I have the following code
for(var i=0; i<3; i++){
var newTF = Ti.UI.createTextField({
top : 20,
hintText : "new text field under "+(i+1)+" text field"
width : '100%',
id:args.obj.fields[i].id
});
$.textFieldView1.add(newTF);
}
newTF.addEventListener('change',function(e){
if(e.source.getValue=='entered value'){
//do something
}
else{
//do something
}
});
Now the problem which I am facing is I am getting the last created textfield(i.e id of last created textfield).So I am not able change trigger any changes on previously created textfields.Its like previous id of textfield is overlapped by latest one.
Can anyone help on this? Thanks in advance
Try this: