used callLater instead of waiting on the event to dispatch. That worked
callLater(setNewFocus)
function setNewFocus():void {
focusManager.setFocus(this.augmentPackageForm.insuranceValue);
}
--- In [email protected], "Joshua" <w...@...> wrote:
>
> This is driving me nuts. I have a form that has several textInputs in it.
> When you tab out of a textInput and you have entered something that is not
> currently in the database I create a Popupwindow with another form in it so
> the user can add more details (Quick Add for Quickbooks style) about the new
> text entry. I'm trying to get the form that is in the popupmanager to get
> the focus and it kinda works... meaning it looks like it has focus (blue
> box), but when I start typing I start filling out the next field in the
> original form (behind the popup). I have the form component that 'pops up',
> implementing IFocusManagerContainer and have tried just about everything to
> get this to work.
>
> this.augmentPackageWindow = new TitleWindow;
> this.augmentPackageForm = new IndivdualizePackageForm;
> this.augmentPackageWindow.addChild(this.augmentPackageForm);
> this.augmentPackageWindow.addEventListener(
> Event.ADDED_TO_STAGE, setAugmentFocus);
> PopUpManager.addPopUp( this.augmentPackageWindow, this, true
> );
> PopUpManager.centerPopUp( this.augmentPackageWindow );
>
> in the function setAugmentFocus i have stuff like....
>
> var oldFm:FocusManager = new FocusManager(this);
> oldFm.deactivate;
>
> var fm:FocusManager = new FocusManager(this.augmentPackageForm);
> fm.activate();
> fm.setFocus(this.augmentPackageForm.insuranceValue);
>
> and like I said, when I run this the "focus" actually goes to the insurance
> Value field in the augmentPackageForm which is a child in the
> augmentPackageWindow, but as soon as I start typing I begin to fill out the
> next field in the underlying form.
>
> Help Please!
>