Event propagation in mediumweight components

Hi,
There's an article "Mixing heavy and light components":
http://java.sun.com/products/jfc/tsc/articles/mixing/
It explains mouse event handling:
"Mouse events on a lightweight component fall through to its parent; mouse events on a heavyweight component do not fall through to its parent. "
What about mediumweight components? Are mediumweight components receiving mouse events like lightweight or like heavyweight components?
Is it possible to infer how the mouse events are propagated just by using JComponent.isLightweightComponent()?
Kari

What do you mean by sub-app .  Are you using modules ?  For regular situations you can set "bubbles" to true on the event.

Similar Messages

  • [svn:fx-trunk] 9215: Event Propagation bug fix

    Revision: 9215
    Author:   [email protected]
    Date:     2009-08-10 17:30:21 -0700 (Mon, 10 Aug 2009)
    Log Message:
    Event Propagation bug fix
    http://bugs.adobe.com/jira/browse/SDK-21044 - Spark Components should use event.preventDefault instead of event.stopPropagation
    Since keyboard are now cancellable, the Spark components should use event.preventDefault() / event.isDefaultPrevented()  instead of event.stopPropagation. I updated ButtonBar, RadioButton, and DropDownList to use preventDefault(). Also cleaned up Slider and Spinner to always assume the event is cancellable.
    QE notes: Add tests with these components inside of scrollable containers
    Doc notes: None
    Bugs: SDK-21044
    Reviewer: Hans
    Tests run: Slider, Spinner, RadioButton, ButtonBar, DropDownList
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-21044
        http://bugs.adobe.com/jira/browse/SDK-21044
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RadioButton.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/DropDownCont roller.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as

    error dateField not selecion date 27/11/2002 ?
    This is bug flex 3 ?
    thanks

  • Event propagation API

    Hi,
    I recently started using Flex and read through the, very extensive and well written documentation. I read about the event propagation mechanism and was rather stunned that only Objects that have a parent-child relationship take part in event propagation. At first I couldn't believe it but trying to connect to objects that were at very different parts of the display list showed, that the events really do not get delivered! Wouldn't it be better to have a more general mechanism that does not care about the wherabouts of the components? I mean, what if I want to synchronize some model objects that are not even part of the display list with some UI Element they have a relationship with? The target phase doesn't work because its not the model that throws the event (of course!). Or do I miss something here?
    I was expecting a more subject-observer like pattern,  that allows me to connect whatever I want with whatever there is left. So, how do I do that. Do I have to right my own little event dispatching library (what would not be so difficult, but I would rather use something that has already proven its liability)? Can anybody recommend me a good API for that or tell me that I am dead wrong and missing something important?
    Regards,
    Benni

    Only DisplayObjects support bubble and capture propagation.  In a tree of
    regular Objects, as long as you attach a listener to the right object, you
    will be able to get its events.
    Bubble and capture are very dangerous as they break encapsulation.  We only
    use them for situations where the target is unpredictable like in mouse and
    keyboard interaction.  I would probably not use it in a data object tree.
    Maybe if you provide a more explicit example of what you are trying to
    accomplish and what you tried, folks on the forum can help.

  • Integrate javascript event into Oracle ADF Components

    Can someone show me how to use javascript attribute, for instance onclick, in CoreCommandButton? How do we normally integrate javascript event into Oracle ADF Components?

    Hi,
    you already have a link. Its not an Oracle project but a project of Wilfred from Eurotransplant. Feel free to ping him directly on this or ask this question on the Forms forum, if you haven't already, where he most likely is signed up for.
    Frank

  • How to handle events between two custom components?

    Hi ,
         i want to handle events between two custom components, example if an event is generated in one custom component ,and i want to handle it any where in the application.....can any one suggest me any tutorial or meterial in this concept...
    thanks

    Events don't really go sideways in ActionScript by default. They bubble upward. If you want to send an event sideways, you will probably have to coordinate with something higher up in the event hierarchy. You can send the event to a common ancestor, and then pass it down the hierarchy as a method argument.
    Another option is to use a framework that supports Injection. There are a number around these days. The one I'm most familiar with is Mate, which allows you to handle events and inject data in MXML. Mate is meant to be used as an MVC framework, and you may want to look into it if your application is complex, but you can also use it to coordinate global event handling if you don't need that level of structure.

  • Event propagation

    Hi,
    SAP has standard functionality of event propagation from FU to FB and vice versa.Now if I want to stop event propagation or event cascading functionality from FB to FU do I need to remove any code logic check in the extractor? Can you elaborate in details here.
    Secondly how does preprocessing functionality help in ENM functionality. What specific checks can eb brought about if w ewant to implement this functionality

    Hi Dipak,
    Extract the FU number as TOR_TEC tracking id from TM shown below
    FU EH TRacking ID table
    Tr.Code.Set
    Tracking id
    FU
    123456
    TRQ
    987563
    TO
    458796
    TOR_TEC
    123456
    Define the Tracking id Code Set(TOR_TEC) in Event reporting items under event message profile , configure only to particular internal event code which does not requires event propagation to FB.
    Above configuration supported only when the event posted via EM WebUI,
    you have to apply the same logic in BADI for interface event posting.
    Regards
    Sukumar

  • Event dispatching to swing components

    Hi,
    I'm implementing an extension of JTextPane, and I would like to make it as much reusable as possible.
    In order to do this, the class don't have to know about the external world (components)..
    The class should notify events (e.g. an event could be that a specific string has been typed..) to the other components just sending a message (or event), and all the components registered to that specific event implement their behavior to react to it.. quite simple..
    which is the simplest solution in Java to do this?
    thanks in advance..

    You should implement event dispatching based on the listener model, for consistency. Since you are extending JTextPane, a lot of the event dispatching code is written for you. Look up JTextPane in the javadocs and check out all the classes it is derived from. To take advantage of the already written listener code, simply call the appropriate fireWhateverEvent method whenever something happens. That will cause the event to be dispatched to all listeners registered with that component. If you want to define some new events that aren't covered by any of the listener methods in any of the classes your new class is derived from, here's the general way to do it:
    1) Define a new listener interface that implements the EventListener interface (which contains no methods).
    2) In your new listener interface, include methods for specific events, such as keyPressed, actionPerformed, textTyped, etc...
    3) Each of these methods should take a single parameter describing the event. This parameter should be a class that extends EventObject and that contains data relevant to your event. For example, you may define a TextEvent class that extends EventObject. The only methods EventObject has is getSource() and toString(). You won't really need to override these as long as you call the EventObject(Object) constructor from your TextEvent constructors.
    4) In your JTextPane derived class, define methods that can add, remove, and get a list of all registered event listeners for your event (ex: void addTextListener(TextListener t), void removeTextListener(TextListener t), TextListener[] getTextListeners()).
    5) add*Listener should add the listener to an internal list of listeners (a LinkedList or a Vector are good ways to store the registered listener lists). remove*Listener should remove the listener from the list, and get*Listeners should return the list in array form.
    6) For ease-of-use, define a fire method like fireTextListener(params), which creates a new TextEvent (assuming you're doing the TextListener thing) holding the specified event data and iterates through the internal list of listeners, calling the appropriate method in each one and passing your TextEvent to it.
    7) Call your fire*Event functions wherever appropriate to fire events.
    It's simpler than it sounds. Here's a small example:
    // TextListener.java
    public class TextListener implements EventListener {
        public void textInserted (TextEvent e);
        public void textDeleted  (TextEvent e);
    // TextEvent.java
    public class TextEvent extends EventObject {
        protected int    pos0;
        protected int    pos1;
        protected String text;
        public TextEvent (Object source, int pos0, int pos1, String text) {
            super(source);
            this.pos0 = pos0;
            this.pos1 = pos1;
            this.text = (text != null) ? text : "";
        public TextEvent (Object source, int pos0, int pos1) {
            this(source, pos0, pos1, null);
        public int getPos0 () {
            return pos0;
        public int getPos1 () {
            return pos1;
        public String getText () {
            return text;
    // MyTextPane.java
    public class MyTextPane extends JTextPane {
        LinkedList textListeners = new LinkedList();
        // This is just some method you defined, can be anything.
        public void someMethodThatInsertsText () {
            fireTextInserted(pos0, pos1, textInserted);
        // Same with this, this can be anything.
        public void someOtherMethodThatDeletesText () {
            fireTextDeleted(pos0, pos1);
        public void addTextListener (TextListener t) {
            textListeners.add(t);
        public void removeTextListener (TextListener t) {
            textListeners.remove(t);
        public TextListener[] getTextListeners () {
            TextListener ts = new TextListener[textListeners.size()];
            Iterator     i;
            int          j;
            // Don't think toArray works good because I'm 99% sure you'll
            // have trouble casting an Object[] to a TextListener[].
            for (j = 0, i = textListeners.iterator(); i.hasNext(); j ++)
                ts[j] = (TextListener)i.next();
        protected fireTextInserted (int pos0, int pos1, String text) {
            TextEvent e = new TextEvent(this, pos0, pos1, text);
            Iterator  i = textListeners.iterator();
            while (i.hasNext())
                ((TextListener)i.next()).textInserted(e);
        protected void fireTextDeleted (int pos0, int pos1) {
            TextEvent e = new TextEvent(this, pos0, pos1);
            Iterator  i = textListeners.iterator();
            while (i.hasNext())
                ((TextListener)i.next()).textDeleted(e);
    };There. I just typed that there, didn't test or compile it, but you get the gist of it. Then, like you do with any listener stuff, when you want to set up a listener and register it with a MyTextPane instance, just create some class that extends TextListener and overrides textInserted and textDeleted to do whatever your application needs to do.
    Hope that makes sense.
    Jason

  • Stopping Event Propagation

    Hi All,
    Am facing some issue in event propagation.
    I have a Application component with in which I have a link button. The Application has a mouseDown event listening for it and the link button has the click event listening for it.
    I have a requirement where in if i click on the link button i got to show an image and on again clicking on the link button hiding the image. Basically toggling the hide/show of image on click of the link button. This works fine as expected.
    Now I have mouseDown listening on the Application, where in If I click any where else in the Application again the Image show be hidden and only on click of Link button it should be shown.
    But since I have the mouseDown listening on the Application, whenever I click on the Link button the image is showing properly but then after that when I click the link button again to hide the image, then since two events are getting triggered  the Image is never getting hidden. It always shows up.
    THE FIX I NEED is that when i click on the link button, the parent event should be stopped from bubbling and hence only the Link Button's Click should be called and not the Application's mouseDown.. And in else other places, its fine to have the Application's mouseDown event called.
    I Tried event.stopPropagation () and event.stopImme()...but in vain.......... PLS HELP

    "Jimmy Jeeves" <[email protected]> wrote in
    message
    news:g8va3c$ak4$[email protected]..
    > Hi!
    >
    > I want to provide hotkey in my html webpage. (I am using
    >
    http://code.google.com/p/js-hotkeys/)
    > I also have a chat module in Flex. When I am typing some
    text in the flash
    > object, I don't want the hotkeys to be enabled.
    >
    > I tried to stop the propagation from the flash but it's
    not working.
    >
    > From what I know, the html events are propagated from
    the child to the
    > parents. So if I stop the event from my flash object it
    has to be ok,
    > right?
    >
    > See my example. If I display an Alert from the callback,
    it is displayed,
    > so
    > it works. Why the event is still propagated?
    >
    > Thanks
    >
    > public function reportKeyDown(event:KeyboardEvent):void
    > event.preventDefault();
    > event.stopPropagation();
    > }
    >
    > this.addEventListener(KeyboardEvent.KEY_DOWN,
    reportKeyDown);
    >
    I don't think you can preventDefault on key events. You could
    probably use
    ExternalInterface to tell the web page not to listen for the
    hot keys for a
    while, though.
    HTH;
    Amy

  • Mobile IconItemRenderer - prevent event propagation

    Hello,
    I don't want anything to happen when an element is clicked or touched in a mobile itemRenderer extending IconItemRenderer.
    Isteand of overriding the drawBackground method and not listening for the change event, is there anyway of doing this faster, like preventing the event from propagating?
    Thank you.

    1. commitProperties seems fine
    2. I assume it would be faster since you avoid unnecessary drawBackground calls.  You might want to test to make sure.
    3. Correct, if you can't click on something it won't be able to fire a mouseDown event
    4. The mouseDown listener is added to the renderer in List.dataGroup_rendererAddHandler.  You could tweak it there, but that would require a subclass of List.  I typically find it easier to do from within the renderer via one of the two approaches I mentioned above especially when that changes based on the data in the renderer.
    5. The Flex SDK currently deals exclusively with mouse events.  See the "Mouse vs. Touch Events" section of this spec for more information: http://opensource.adobe.com/wiki/display/flexsdk/Mobile+List%2C+Scroller+and+Touch

  • Help with understanding key event propagation

    Hello,
    I am hoping someone can help me understand a few things which are not clear to me with respect to handling of key events by Swing components. My understanding is summarized as:
    (1) Components have 3 input maps which map keys to actions
    one for when they are the focused component
    one for when they are an ancestor of the focused component
    one for when they are in the same window as the focused component
    (2) Components have a single action map which contains actions to be fired by key events
    (3) Key events go to the currently focused component
    (4) Key events are consumed by the first matching action that is found
    (5) Key events are sent up the containment hierarchy up to the window (in which case components with a matching mapping in the WHEN_IN_FOCUSED_WINDOW map are searched for)
    (6) The first matching action handles the event which does not propagate further
    I have a test class (source below) and I obtained the following console output:
    Printing keyboard map for Cancel button
    Level 0
    Key: pressed C
    Key: released SPACE
    Key: pressed SPACE
    Level 1
    Key: pressed SPACE
    Key: released SPACE
    Printing keyboard map for Save button
    Level 0
    Key: pressed SPACE
    Key: released SPACE
    Level 1
    Key: pressed SPACE
    Key: released SPACE
    Printing keyboard map for Main panel
    Event: cancel // typed SPACE with Cancel button having focus
    Event: save // typed SPACE with Save button having focus
    Event: panel // typed 'C' with panel having focus
    Event: panel // typed 'C' with Cancel button having focus
    Event: panel // typed 'C' with Save button having focus
    I do not understand the following aspects of its behaviour (tested on MacOSX although I believe the behaviour is not platform dependent):
    (1) I assume that the actions are mapped to SPACE since the spacebar clicks the focused component but I don't explicitly set it?
    (2) assuming (1) is as I described why are there two mappings, one for key pressed and one for key released yet the 'C' key action only has a key pressed set?
    (3) assuming (1) and (2) are true then why don't I get the action fired twice when I typed the spacebar, once when I pressed SPACE and again when I released SPACE?
    (4) I read that adding a dummy action with the value "none" (i.e. the action is the string 'none') should hide the underlying mappings for the given key, 'C' the my example so why when I focus the Cancel button and press the 'C' key do I get a console message from the underlying panel action (the last but one line in the output)?
    Any help appreciated. The source is:
    import javax.swing.*;
    public class FocusTest extends JFrame {
         public FocusTest ()     {
              initComponents();
              setTitle ("FocusTest");
              setLocationRelativeTo (null);
              setSize(325, 160);
              setVisible (true);
         public static void main (String[] args) {
              new FocusTest();
    private void initComponents()
         JPanel panTop = new JPanel();
              panTop.setBackground (java.awt.Color.RED);
    JLabel lblBanner = new javax.swing.JLabel ("PROPERTY TABLE");
    lblBanner.setFont(new java.awt.Font ("Lucida Grande", 1, 14));
    lblBanner.setHorizontalAlignment (javax.swing.SwingConstants.CENTER);
              panTop.add (lblBanner);
              JPanel panMain = new JPanel ();
              JLabel lblKey = new JLabel ("Key:");
              lblKey.setFocusable (true);
              JLabel lblValue = new JLabel ("Value:");
    JTextField tfKey = new JTextField(20);
    JTextField tfValue = new JTextField(20);
    JButton btnCancel = new JButton (createAction("cancel"));     // Add a cancel action.
    JButton btnSave = new JButton (createAction("save"));          // Add a sve action.
              panMain.add (lblKey);
              panMain.add (tfKey);
              panMain.add (lblValue);
              panMain.add (tfValue);
              panMain.add (btnCancel);
              panMain.add (btnSave);
              add (panTop, java.awt.BorderLayout.NORTH);
              add (panMain, java.awt.BorderLayout.CENTER);
    setDefaultCloseOperation (javax.swing.WindowConstants.EXIT_ON_CLOSE);
    // Add an action to the panel for the C key.
              panMain.getInputMap (JComponent.WHEN_IN_FOCUSED_WINDOW).put (KeyStroke.getKeyStroke (java.awt.event.KeyEvent.VK_C, 0), "panel");
              panMain.getActionMap ().put ("panel", createAction("panel"));
              // FAILS ???
              // Add an empty action to the Cancel button to block the underlying panel C key action.
    btnCancel.getInputMap().put (KeyStroke.getKeyStroke (java.awt.event.KeyEvent.VK_C, 0), "none");
    // Print out the input map contents for the Cancel and Save buttons.
    System.out.println ("\nPrinting keyboard map for Cancel button");
    printInputMaps (btnCancel);
    System.out.println ("\nPrinting keyboard map for Save button");
    printInputMaps (btnSave);
              // FAILS NullPointer because the map contents are null ???
    System.out.println ("\nPrinting keyboard map for Main panel");
    // printInputMaps (panMain);
    private AbstractAction createAction (final String actionName) {
         return new AbstractAction (actionName) {
              public void actionPerformed (java.awt.event.ActionEvent evt) {
                   System.out.println ("Event: " + actionName);
    private void printInputMaps (JComponent comp) {
         InputMap map = comp.getInputMap();
         printInputMap (map, 0);
    private void printInputMap (InputMap map, int level) {
         System.out.println ("Level " + level);
         InputMap parent = map.getParent();
         Object[] keys = map.allKeys();
         for (Object key : keys) {
              if (key.equals (parent)) {
                   continue;
              System.out.println ("Key: " + key);
         if (parent != null) {
              level++;
              printInputMap (parent, level);
    Thanks,
    Tim Mowlem

    Use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the posted code retains its original formatting.
    1) In the Metal LAF the space bar activates the button. In the Windows LAF the Enter key is used to activate the button. Therefore these bindings are added by the LAF.
    2) The pressed binding paints the button in its pressed state. The released binding paint the button in its normal state. Thats why the LAF adds two bindings.
    In your case you only added a single binding.
    3) The ActionEvent is only fired when the key is released. Same as a mouse click. You can hold the mouse down as long as you want and the ActionEvent isn't generated until you release the mouse. In fact, if you move the mouse off of the button before releasing the button, the ActionEvent isn't even fired at all. The mouse pressed/released my be generated by the same component.
    4) Read (or reread) the [url http://java.sun.com/docs/books/tutorial/uiswing/misc/keybinding.html#howto]How to Remove Key Bindings section. "none" is only used to override the default action of a component, it does not prevent the key stroke from being passed on to its parent.

  • Events/Selections in nested components

    Hi All,
    I'm having difficulty trying to understand how to pass events to nested components.
    I am working with the following hierarchy:
    JScrollPane contains JList which contains JScrollPane(s), each with a JList.
    Imagine a scrollable list of TV-program categories. Each category is itself a scrollable list of channels. I am able to scroll through the list of categories, but when I select a category, I'd like to be able to scroll through the list of channels.
    Any help would be appreciated.
    Thanks,
    Pete

    JScrollPane contains JList which contains JScrollPane(s), each with a JList.
    Imagine a scrollable list of TV-program categories. Each category is itself a scrollable list of channelsSounds more like a JTree to me.
    db

  • Event Listening across two components?

    Let's say I have two components. One of them has a button.
    The other will post an Alert once it detects that the button has
    been pressed.
    How can the Alert component detect the button press of the
    other component? I figured an eventListener would been needed, but
    I am not sure how to write it.

    Something like that might work, but from a programming
    standpoint, your components should be designed in such a way that
    they know absolutely nothing about the outside world (parent or
    other components). For all it knows, it's the only component in
    existence. But, using events, he could send out a message (event),
    that if someone else (another component) happened to hear it, they
    could do something in response to it. Think of the movie "Contact"
    (if you've ever seen it).
    Anyway, your best bet is to make a custom event that is able
    to encapsulate an ArrayCollection. Then when the button is clicked,
    you wrap up the AC in the event and send it out. Your other
    component will be listening for events that are of that type (your
    custom event). Then he can unwrap the AC in it and use it. If you
    do not know how to create custom events and/or send data in events,
    look up a tutorial on it. It's not that difficult to implement if
    you can follow the concept I just talked about. However, I've also
    personally tried to make a custom event to pass an ArrayCollection,
    and for some reason it never worked (even though I followed some
    tutorials down to the letter).

  • Swing Mouse Event Propagation

    Hello,
    I'm developing my first Swing application.
    One of the components is a thumbnail image panel (ext. JPanel) containing several other components (mostly ext. JLabel). I have the image panel receiving mouse events so as to allow the user to see when the image panel is 'in focus' (rollover effect basically) and to allow the image panel to be selected by clicking.
    I added a tooltip to one of the contained labels, and it now 'consumes' my mouse enter/exit event so that now it is as if the label is not part of it's container. This is not what I want.
    Is there not some simple way to allow mouse events to be listened for by a child component but yet to 'fall through' to a listener in the parent component?
    Any insight into this little problem would be most appreciated.
    Thanks.

    You can listen to all MouseEvents generated:
    Toolkit.getDefaultToolkit().addAWTEventListener( new AWTEventListener()
         public void eventDispatched(AWTEvent e)
              System.out.println(e);
    }, AWTEvent.MOUSE_MOTION_EVENT_MASK + AWTEvent.MOUSE_EVENT_MASK);You would then need to determine if the source component is a descendent of your main panel.

  • Stopping an event propagation

    Hi!
    I want to provide hotkey in my html webpage. (I am using
    http://code.google.com/p/js-hotkeys/)
    I also have a chat module in Flex. When I am typing some text
    in the flash object, I don't want the hotkeys to be enabled.
    I tried to stop the propagation from the flash but it's not
    working.
    From what I know, the html events are propagated from the
    child to the parents. So if I stop the event from my flash object
    it has to be ok, right?
    See my example. If I display an Alert from the callback, it
    is displayed, so it works. Why the event is still propagated?
    Thanks

    "Jimmy Jeeves" <[email protected]> wrote in
    message
    news:g8va3c$ak4$[email protected]..
    > Hi!
    >
    > I want to provide hotkey in my html webpage. (I am using
    >
    http://code.google.com/p/js-hotkeys/)
    > I also have a chat module in Flex. When I am typing some
    text in the flash
    > object, I don't want the hotkeys to be enabled.
    >
    > I tried to stop the propagation from the flash but it's
    not working.
    >
    > From what I know, the html events are propagated from
    the child to the
    > parents. So if I stop the event from my flash object it
    has to be ok,
    > right?
    >
    > See my example. If I display an Alert from the callback,
    it is displayed,
    > so
    > it works. Why the event is still propagated?
    >
    > Thanks
    >
    > public function reportKeyDown(event:KeyboardEvent):void
    > event.preventDefault();
    > event.stopPropagation();
    > }
    >
    > this.addEventListener(KeyboardEvent.KEY_DOWN,
    reportKeyDown);
    >
    I don't think you can preventDefault on key events. You could
    probably use
    ExternalInterface to tell the web page not to listen for the
    hot keys for a
    while, though.
    HTH;
    Amy

  • Event Propagation again. Sorry

    Hi guys, I vave a pretty simple app to test how the propagation works.I do not undestand, why the propagation on the stage 3 (bubbling) works in the oppsit way than it should work.
    Here is my code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
                xmlns:view="view.*" initialize="init()">
    <mx:Script>
    <![CDATA[
         import mx.controls.Label;
         import mx.events.FlexEvent;
         import mx.controls.Button;
         import mx.controls.Alert;
         import flash.events.TextEvent;
         private function init():void {
              this.addEventListener(MouseEvent.CLICK, handleTestEvent);
              vBox2.addEventListener(MouseEvent.CLICK, handleTestEvent2);
              vBox1.addEventListener(MouseEvent.CLICK, handleTestEvent1);
         private function handleTestEvent2(event:MouseEvent):void {
              Alert.show("This is VBox2  " + event.eventPhase );
         private function handleTestEvent1(event:MouseEvent):void {
              Alert.show("This is VBox1  " + event.eventPhase);
         private function handleTestEvent(event:MouseEvent):void {
              Alert.show("This is Application  " + event.eventPhase);
    ]]>
         </mx:Script>
              <mx:VBox id="vBox2">
                   <mx:VBox id="vBox1">
                        <mx:Button id="testButton" label="Click Me" />
                   </mx:VBox>
              </mx:VBox>
         </mx:Application>
    So, when I run this application, the first popup I see is: This is Application 3. Then: This is VBox2 3  and the last one: This is VBox1 3. But as I understud the order should be: This is VBox1 3,  This is VBox2 3,  This is Application 3.
    Could some body explain what's wrong?
    Thanks.

    The Alert boxes sit on the top of the display.
    When you get the first alert, it appears over the content.
    When the second happens it sits over the first alert.
    Then the third happens and sits over the second.
    So, when you see the third alert, it looks like there is only one box, but there are two underneath - hidden.
    You dismiss the third alert and see the second.
    You dismiss the second and see the first.
    It looks like the order is reversed, but in fact the order is correct and they have just popped up over each other. It feels that dismissing the third alert causes the second alert to popup, but it doesn't - it was there all along.
    Alert isn't synchronous.

Maybe you are looking for

  • My MacBook Pro be ballin' - beachballin' that is. Big freeze problems.

    Hi, My MacBook Pro has decided to start freezing up and beachballing whenever I use Skype, Mail, Plex and sometimes when I use Launchbar. Usually my MacBook locks up for anything from several seconds to a few minutes, making it nearly impossible to g

  • Upgrade MacBook Hard Drive

    While it is obvious that I can upgrade a hard drive, I would like to do so without reinstalling software and, as importantly, changing an identifier (such as a serial number) so that my online backup software will not balk when trying to back up. I h

  • JSM QUEUE ERROR - WEBLOGIC SERVER

    I have created a JMS queue and deployed it in weblogic server. But I am getting the following error while running the proxy service: " <Jun 18, 2009 5:22:32 PM IST> <Error> <OSB Kernel> <BEA-382004> <Failed to proce ss request message for service Pro

  • How to create an xml sitemap

    I was asked to create a sitemap for one site and I had to do it the hard way. I had to upload the site, went to an online xml sitemap generator, generate the xml file and upload it. But I was wondering whether DW has an option to generate an xml site

  • I can't open itunes on my PC please help.

    Ever since I donwloaded the latest itunes version I haven't been able to open my itunes. I've tired safe mode and still nothing, I've also tried dleting itunes and re-installing, no help, And finally I removed itunes genius folder from itunes and sti