xithor
03-24-2006, 05:26 PM
I've got a problem with a TitleWindow not properly gaining focus at startup of the application...
I load up a TitleWindow as a PopUp. I then setFocus() on a text input box in that window. It highlights the input box in blue, but the focus is not really on it (can't type in it without manually selecting it). Then, if I hit tab to go to the next input box, it starts cycling through the items in my main canvas.
I'm using:
initialize="startUp();"
On my main canvas to kick off my startup function.
Below is the code I'm using to start up the window.
var loginWin:Object;
function startUp() {
loginWin=TitleWindow(PopUpManager.createPopUp(main Canvas, loginBox , true));
loginWin.mainApp = this;
loginWin.centerPopUp();
}
When I use the exact same code later on while running the app, it works fine. It's only on startup. I'm guessing it's related to the application not being fully initialized, but I can't find a way around that.
Any thoughts?
I load up a TitleWindow as a PopUp. I then setFocus() on a text input box in that window. It highlights the input box in blue, but the focus is not really on it (can't type in it without manually selecting it). Then, if I hit tab to go to the next input box, it starts cycling through the items in my main canvas.
I'm using:
initialize="startUp();"
On my main canvas to kick off my startup function.
Below is the code I'm using to start up the window.
var loginWin:Object;
function startUp() {
loginWin=TitleWindow(PopUpManager.createPopUp(main Canvas, loginBox , true));
loginWin.mainApp = this;
loginWin.centerPopUp();
}
When I use the exact same code later on while running the app, it works fine. It's only on startup. I'm guessing it's related to the application not being fully initialized, but I can't find a way around that.
Any thoughts?