I'm having an issue with trying to open a tertiary window on the iPhone using Ti.UI.currentTab.open.
The second window which I initially open using Ti.UI.currentTab.open works fine. The back button shows up and I can click back to return to the primary window specified in the tab group.
My issue is I need to open another window from that second window. When doing so on the iPhone, the third window shows up behind the second one. The title bar shows the title of the third window and the back button shows the title of the second window but the third window never shows up.
If I use a .close() command on the second window in the same event listener that I am opening the third window, the third window will appear but if I click the back button there is no second window to go to since it has been closed.
This functionality works fine on the Android.
Any help is gladly appreciated.
4 Answers
okay, little workaround that worked for me (ducktape please!)
annotations[i].addEventListener('click', function(e) { if (currentDetail == e.annotation.myid) { currentDetail = '0'; return false; } details[e.annotation.myid] = Titanium.UI.createWindow({ url: '../main_windows/detail.js', title: 'Annotation Details', currentAnnotation: e.annotation.myid, popup: e.annotation.popup, latitude: e.annotation.latitude, longitude: e.annotation.longitude }); Titanium.UI.currentTab.open(details[e.annotation.myid],{animated:true}); currentDetail = e.annotation.myid; });if the click event is fired and tries to open the same window, it will set currentDetail to 0 (so it could be openend again if the user clicks, but won't be "fired two times") and return false.
looking forward to a better solution...
I've had a similar problem with a 3rd or 4th level window trying to open a map view. The screen opens with a title, but white background and nothing else. I've suspected it was actually opening "behind" the parent window, or something like that. I'll watch to see if anyone replies, as I'm still stuck...
Hey Richard,
Thanks for the reply. I think what you are suspecting is correct. The tertiary window opens behind the secondary window. If you use a .close() method on the secondary window in the event listener you are using to open the tertiary window, you will see the third window.
The only problem is that when you hit the back button, there is no second window to go back to since it has been closed.
Any additional insight is gladly appreciated.
same here. the problem is (as far as i can debug) that the click event is fired two times (except the first marker i click on)... i guess for this reason the window is openend two times with the same parameters and this confuses titanium... not sure if it will work with .close() funktion but i'll try and update you..
Your Answer
Think you can help? Login to answer this question!