Hello,
I've been working on this application in which I have 2 windows.
Now the main window needs to make a call to the sub window sending a single function.
I have the following code to create the window:
var options = new air.NativeWindowInitOptions();
options.systemChrome = "none";
options.type = "lightweight";
options.resizable = true;
options.maximizable = true;
var winwid = 600;
var winhei = 500;
var mainWidowPos = new Array();
var mainWindowPos = getTopLeft(winwid,winhei); //This function is to calculate the center of the screen
var windowBounds = new air.Rectangle(mainWindowPos[0],mainWindowPos[1],winwid,winhei);
newHTMLLoader = air.HTMLLoader.createRootWindow(true, options, true, windowBounds);
newHTMLLoader.load(new air.URLRequest(url));
Now that that window is created I need to make a call from window 1 to window 2 (the newly created one, the title of the window is SCR2_BILL).
Maybe this table can clear it up:
| Window 1 (main) | Window 2 (created by code) |
|---|---|
This code is in window 1 and is being called:
| |
The link does not exist because air.NativeApplication.nativeApplication.openedWindows[i].window.htmlLo ader.stage.nativeWindow is not an object. Does anyone know what the object is after openedWindows[i] which I can use to call functions from the document?
Thanks in advance,
Roelof
PS: the code window 2 is executing is working, it has been tested.
North America
Europe, Middle East and Africa
Asia Pacific