3 Replies Latest reply on Oct 17, 2006 10:30 AM by jtan

    mouseMove event dispatching

    AppDevelopper
      I noticed a confusing behavior regarding event dispatching when a control holds a mouse event.
      Usually, in a standard GUI framework, when you resize a spliter, the event is not dispatched to other control.
      it's not the case with a flex spliter. The event is thrown to all controls the mouse moves over during the drag of the spliter.

      how can we stop that?

      thanks
        • 1. Re: mouseMove event dispatching
          jtan
          I believe that we were tracking a similar bug to this. There is a bug that you get mouseMove events on other components when you are dragging a PopUp around. This may be the same bug. Can you please clarify for me what "spliter" you are talking about in your post. Is this the splitter for a DividedBox component?

          Thanks,
          Joan Lafferty
          Flex SDK QA
          • 2. Re: mouseMove event dispatching
            AppDevelopper Level 1
            Yes it is the Splitter for a DividedBox

            Thanks
            • 3. Re: mouseMove event dispatching
              jtan Level 1
              After some internal discussion, I hear that this is not a bug after all. Here is the recommendation (from our dev team) for you to get all of your mouse events to one target -

              1- add a mousedown handler to their component.
              2. in the mousedown handler, add a mousemove and mouseup handler to the systemManager. These handlers should be registered for capture.
              3. in those handlers, do what you need to do, then stop propogation of the event (see the methods on the event class).
              4. in the mouseup handler, remove the mousemove and mouseup handlers. make sure you remove them from the system manager, and also set the capture flag in the remove.

              HTH,
              Joan