开发者

why is my titanium application going into infinite loop wer it works fine in the iphone?

i'm starting up in titanium and i successfully created an app, or i thought so....

i launched application in iphone and the code is working fine with no issues.

but wen i deployed the appin android my application is going into infinite loop of creating window开发者_Python百科s.

all the code works fine until i used this piece of code in creating a new window of tabs..

var win=Ti.UI.currentWindow;

win.backgroundImage='goldmenubackground.jpg';

var win_zipsearch=Ti.UI.createWindow({backgroundImage:'goldmenubackground.jpg'});
var win_search=Ti.UI.createWindow({backgroundImage:'goldmenubackground.jpg'});
var win_fav=Ti.UI.createWindow({backgroundImage:'goldmenubackground.jpg'});
var win_morerest=Ti.UI.createWindow({backgroundImage:'goldmenubackground.jpg'});

var tabgroup1=Ti.UI.createTabGroup();

var tab_nearby=Ti.UI.createTab({title:'Near By',window:win});
var tab_zipsearch=Ti.UI.createTab({title:'Zip Search',window:win_zipsearch});
var tab_search=Ti.UI.createTab({title:'Search',window:win_search});
var tab_fav=Ti.UI.createTab({title:'My Favourites',window:win_fav});


var tab_morerest=Ti.UI.createTab({title:'More Restaurants',window:win_morerest});

    tabgroup1.addTab(tab_nearby);
    tabgroup1.addTab(tab_zipsearch);
    tabgroup1.addTab(tab_search);
    tabgroup1.addTab(tab_fav);
    tabgroup1.addTab(tab_morerest);
    tabgroup1.open();

my aim was to create a window of tabgroup insted it is creating a loop of window creation with tabs in it.

i have to uninstall the app to stop it's loop of creations.

please help

i cant find any error in the code .......

FYI: i created some other sample windows and they are working fine.


you cant take your currentWindow, win and stick it in the TabGroup the way you are.

also would need to see more of the code that is calling this .js file to pinpoint the exact problem; but I think that is the start of your problem

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜