mouse_move not firing and mouse_down missing
Reported by Darren Bishop | May 21st, 2009 @ 01:08 AM
I am trying to use FunFx for feature testing with Cucumber.
My
application is a demonstration of a custom drag-and-drop library
which
you can check out at http://sites.google.com/site/flexinsproject.
The dnd implementation uses MouseEvents to detect drag gestures
etc,
and so I try to use FlexDisplayObject#mouse_move but it seems to
be
completely ineffective. I had to modify the AutoQuickEnv.xml to
declare the buttonDown property, also modifying the elements.rb
accordingly.
Now I think I've done what I have done correctly as I do not get
any
errors - the question is, have I done enough? At this point I
simply
feel that MouseEvents just don't manifest or aren't dispatched in
the
Flex app. I experimented with using FunFx to click a button,
the
clickHandler for which dispatches MouseEvents on various parts of
the
app such that I see the desired dragging behaviour; put simply, I
can
get dragging to work (albeit in a round about way) without
physically
touching the mouse, thus ruling out the artifical dispatch of
events
as the cause of the problem.
So the questions are:
* What makes a click so different from a mouse_move? * Where are
the other mouse_x events e.g. mouse_down, which I think another
user is after?
And one stupid one:
* This wouldn't have anything to do with the FlashPlayer needing
focus would it?
Help would be much appreciated - if you want more details please ask.
Comments and changes to this ticket
-
Darren Bishop May 23rd, 2009 @ 01:28 AM
Ok so completely hacked together a solution for this.
Firstly I modified elements.rb, element.rb and firewatir.rb adding a fire_event_ext call-chain that results in a new method being called on the ExternalInterface.
Then I implemented AutomationHelper.as in funfx-extension.swc that adds fireFunFxEventExt method to the ExternalInterface. This by large rips of most of the default funfx procedure i.e. locating the target component and constructing the event with all properties populated.
The difference is the event gets dispatched directly on that target, rather than going through the rest of the Automation procedure.
This works a treat and is no inconvenience to me over the way it must be used: funfx-extension.swc compiles in funfx.swc so the this dependency can be dropped in favour of funfx-extension.swc (still with internal scope).
If anyone is interested in the details i.e. the code, please leave a comment.
Team: I would always prefer a first class solution to something like this. I appreciated some insight into why these events are not dispatching with the standard funfx?
Darren
-
Darren Bishop May 23rd, 2009 @ 08:21 AM
- Assigned user set to Peter Nicolai Motzfeldt
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Functional testing of Flex applications from Ruby