I am developing iphone application in Titanium. Unable to set addEventListener to my dynamically receiving contents.
Here is my code:
var receivedAccountsLength = Ti.App.userAccounts.length;
var topFrom = 100;
for(var i=1;i<receivedAccountsLength;i++)
{
var cont = Ti.UI.createLabel({text: Ti.App.userAccounts[i].accountName , width: 100, height: 30, borderWidth: 1, top: topFrom });
win.add(cont);
cont.addEventListener('click', function()
{
alert("cont");
});
topFrom += 50;
}
can any one..
@suresh Try this code this is Absolute working for you.
first you get your “eventListener object” then you can get you its property,
for help just Copy paste this code
If, working the enjoy Titanium …..Cheers…!