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.
Your Answer
Think you can help? Login to answer this question!