I have a listing page which list all the data I pull from backend API. The window has a focus event.
ListingWin.addEventListener('focus', function() { // my listing code here. });
When I click on a row, it takes to another window(editWin) to edit the row contents. When I edit and save data, I call the above window fire event to list all the updated data from back end.I use fireEvent('focus'); of above wndow.
Application crashes in iphone everytime when I edit and save. It is found that the focus event of ListingWin fires more than once. I donot know why and how it is happening.
Please let me know how can we resolve it
3 Answers
Accepted Answer
While I don't like to use too many Ti.App level events, I do use them for refreshing a table of data. I found that waiting until the focus event of the containing view caused the tables to refresh in front of the user. I wanted those tables updated when the user first sees the table. Now, a manual refresh of lets say an RSS feed is different, as the user expects the refresh to take place, as they initiated it.
Hi Reben
Please provide more than the single line of code you have so far. It should be simple enough to allow us to reproduce the situation and help you.
I read this http://developer.appcelerator.com/question/134090/fire-event-execute-multiple-time But it didn't work for me.
Your Answer
Think you can help? Login to answer this question!