1

I need to create a new top level window or a child window based on the action of the user and i'm using javascript to know the action that has been taken. I'm using the Ti.UI.createWindow() for this and I have tried it with all the possible variations of it i.e null, sending the url, sending the options object but I couldn't get result from any of them. Could anyone show me how to create both a new top-level window and a child-window, I know it sounds silly but I can't get it to work. I'm using Tide SDK 1.3.1 beta on windows 7

P.S: The Ti.UI.currentWindow is working fine and I could change the width and height by using the set methods.

Daniel Hedberg
  • 5,677
  • 4
  • 36
  • 61
Siva.K
  • 113
  • 5
  • A small clarification regarding my "P.S" I can work the attributes of a window using the Ti.UI.currentWindow but I can't seem to create a new child window or a new top window or may be i'm missing something.....your help would be much appreciated, thank you – Siva.K Mar 05 '13 at 18:13

2 Answers2

2

I've figured it out that to create a new child window we need to use the "open()" method after the createWindow() call.

Example: Ti.UI.createWindow("app://example.html").open();

Siva.K
  • 113
  • 5
0

Ti.UI.createWindow is the way to go. You also need to actually "show" a created window, for it to show up, maybe you forgot to do that?

Example:

var new_window = Ti.UI.createWindow("example.html");
new_window.show();
Alex
  • 1,157
  • 3
  • 11
  • 25