Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6333677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:30:42+00:00 2026-05-24T18:30:42+00:00

I have a class FlexNativeWindow who extends to NativeWindow. I use this method to

  • 0

I have a class FlexNativeWindow who extends to NativeWindow.
I use this method to create new window on my AIR app.
All works well but some keyboard interraction is not availaible.

For exemple focus arround textinput is not visible.
Key down and up don’t work on DropDownList.
TabOrder doesn’t work well!

Can you explain Why? Because I’m very desapointed!

Code to create the new window

var wdetcorr:wDetailCorrespondant = new wDetailCorrespondant();
                wdetcorr.monIdCorresp = correspDG.selectedItem.crIndex;

                var wOptions:NativeWindowInitOptions = new NativeWindowInitOptions();
                wOptions.systemChrome = NativeWindowSystemChrome.NONE;
                wOptions.transparent = false;
                var fnwDetailPatient:FlexNativeWindow = new FlexNativeWindow(wdetcorr, wOptions);
                fnwDetailPatient.active();

Code about my custom NativeWindow

package fr.int.ui.windowSkin
{
    import flash.display.NativeWindow;
    import flash.display.NativeWindowInitOptions;
    import flash.events.Event;
    import flash.events.KeyboardEvent;
    import flash.ui.Keyboard;

    import mx.core.IUIComponent;
    import mx.core.IVisualElement;
    import mx.core.IVisualElementContainer;
    import mx.core.UIComponent;
    import mx.events.*;
    import mx.managers.WindowedSystemManager;

    [Event(name="creationComplete", type="mx.events.FlexEvent")]

    public class FlexNativeWindow extends NativeWindow implements IFlexNativeWindow
    {
        private var _systemManager:WindowedSystemManager;

        private var _content:UIComponent;

        private var _window:IVisualElementContainer;

        public function FlexNativeWindow(window:IVisualElementContainer, initOptions:NativeWindowInitOptions = null)
        {
            super(initOptions);


            _window = window;

            addEventListener(Event.ACTIVATE, windowActivateHandler);

        }

        public function addElement(control:IVisualElement):void
        {
            _window.addElement(control);
        }

        public function removeElement(control:IVisualElement):void
        {
            _window.removeElement(control);
        }

        private function windowActivateHandler(event:Event):void
        {
            event.preventDefault();
            event.stopImmediatePropagation();
            removeEventListener(Event.ACTIVATE, windowActivateHandler);

            if (stage)
            {
                if (!_systemManager)
                    _systemManager = new WindowedSystemManager(IUIComponent(_window));

                stage.addChild(_systemManager);

                dispatchEvent(new FlexEvent(FlexEvent.CREATION_COMPLETE));

                stage.addEventListener(Event.RESIZE, windowResizeHandler);
                stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownListener);

            }
        }

        private function keyDownListener (e:KeyboardEvent):void {

            if (e.keyCode == Keyboard.ESCAPE) {
                stage.nativeWindow.dispatchEvent(new Event("myEventClose", true));
                stage.nativeWindow.close();
            }


        }

        private function windowResizeHandler(event:Event):void
        {
            // prise en compte de la valeur mini
            UIComponent(_window).height = stage.stageHeight;
            UIComponent(_window).width = stage.stageWidth;


        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T18:30:43+00:00Added an answer on May 24, 2026 at 6:30 pm

    You should implement IFocusManagerContainer in FlexNativeWindow to fix the focus issues.

    Here is how to do it in Flash Builder:

    1. Press Ctrl + Shift + T and type in IFocusManagerContainer
    2. Open corresponding file
    3. Implement all declared methods in your class FlexNativeWindow

    P.S: However this approach can fail because flex components should be placed inside flex container while NativeWindow is a native class, not a Flex SDK class. I suggest you to use Window class that is a Flex container and already implements IFocusManagerContainer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have class in server side and I want use method of this class
I have class method that returns a list of employees that I can iterate
I have: class MyClass extends MyClass2 implements Serializable { //... } In MyClass2 is
I have Class<? extends Object> class1 = obj.getClass(); Field[] fields = class1.getDeclaredFields(); for (Field
I have class Achievement(MyBaseModel): pass class Alias(MyBaseModel): achievements = models.ManyToManyField('Achievement') >>> ach = Achievement.objects.all()[1]
i have class like this DrillDownAppAppDelegate.h PictureCell.h RootViewController.h SlideShowViewController.h DrillDownAppAppDelegate.m PictureCell.m RootViewController.m SlideShowViewController.m i
I have class where the relevant part looks like class C { void Method<T>(SomeClass<T>
I have class with a forwarding method foo : void foo( Concrete c, String
I have class which has a method that needs to return three DataTables. I
I have class MyForm which inherited from QMainWindow . Here's my code: std::auto_ptr<MyForm> pForm(new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.