I am making a simple app that on the main page there is a menu that opens a window and displays content. If that window is still open and they click on another menu item in the main window I want the new content to appear in the window that is open.
Here is my code to open the window:
function popupWindow(page){
var myWin = Titanium.UI.createWindow({
id: "propertyWindow",
title: "Core Reading with Jazzles",
url: "app://" + page,
width: screen.width - 100,
height: screen.height - 100,
maximizable: false,
minimizable: false,
closeable: true,
resizable: false,
fullscreen: false,
maximized: false,
minimized: false,
usingChrome: true,
topMost: true,
visible: true,
transparentBackground: false,
transparency: false
});
myWin.open();
myWin.CENTERED;
}
How to I check if the window is already open? and if it is change the URL?
1 Answer
Gary,
Off the top of my head, you could use either (haven't tested in actual code):
Titanium.UI.UserWindow.isActive
or
Titanium.UI.UserWindow.isCloseable
or
Your Answer
Think you can help? Login to answer this question!