Reputation: 3142
I have been using Titanium for an Android application that does some microblogging through restful web services. Everything works fine, but I am using tabhost to store five windows at the same time and some of these windows use same event handlers to get same kind of data. So when you get some kind of data from server, events from multiple windows may start to work. And these events may fire other events and things got all messed up.
Is there a way to suppress other objects and just enable the object in focus? How can I prevent this situation?
Upvotes: 1
Views: 197
Reputation: 476
One way that I managed things like that is to hook my actions to the focus event of the window the user is actually opens. Then use whatever I need to render that window. It might be that you're trying to update all windows before the user is actually opens them. That's not really necessary. Wait until they open the window and then update it. As long as you have the data set up, rendering the window is quick and you can do it realtime and without too much delay.
On a mobile, you really have to try to do things as late as possible.
Upvotes: 1