heavy weight windo close event does not close its clild light weight window

You must Login before you can answer or comment on any questions.

I am trying to close a heavy weight window from its clild (a light weight window). Its just a trial code. my ultimate aim is to handle window queue. more descriptively, i want to close specific windows on specific events, without disturbing window relationships (new activity for new heavy weight window).

It would be very helpful if someone help me wid this. here is my trial code :

win = Ti.UI.createWindow( { title :'main', backgroundColor : 'pink' } );

win1 = Ti.UI.createWindow( { title :'high weight', backgroundColor : 'blue' } ); win2 = Ti.UI.createWindow( {title :'low Weight', backgroundColor : 'white'

}

);

var lab = Ti.UI.createButton({ title : 'click', height :50, width : 50 });

win.add(lab);

lab.addEventListener('click',function(e){ win1.open({modal:true});

        var x = Ti.UI.createButton({
            title :'clickkk',
            height:50,
            width :50
        });
        win1.add(x);
        x.addEventListener('click',function(){
                        win2.open();
                        var y = Ti.UI.createButton({
                        title :'click2',
                        height:50,
                        width :50
                    });
                    win2.add(y);
                    y.addEventListener('click',function(){
                        win1.close();
                    });
        });//x add event

});//lab add event

Here, problem is on close event of win1, win2 will not get closed. and win window will be displayed but it will not get active(button lab will not act normal) May be am lacking of basic concepts but not getting what. Please help me.

— asked 12 months ago by gandhali ambike
1 Comment
  • additional information : Application type : mobile Titanium Studio, build: 1.0.4.201108101535 platform and version : ubuntu 11.04 Titanium SDK: 1.7.5 (11/02/11 17:00 ab20af7)

    — commented 12 months ago by gandhali ambike

Your Answer

Think you can help? Login to answer this question!