incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andrei apostolache <>
Subject Re: [Proposal] Different behaviour on click and doubleClick on UIComponent
Date Sat, 21 Apr 2012 17:54:41 GMT
Doug, Alex I'm pretty sure there should be something in the UIComponent to
make the difference between click & doubleClick event. I didn't investigate
too much in this, it was just something that I had to deal on Friday and
wanted to see if someone else had this problem (mine was a bit more complex
that on click event the component was reposition so the double click was
impossible to be made, but also the component need different behaviour on
click & double click).
What I don't know for sure is why there is the
*doubleClickEnabled*property in UIComponent. Maybe a quicker and
simpler solution might be a
callLater on dispatching the "click" event and a flag on "doubleClick"
handler, if the flag is set on true on doubleClick once the callLater is
called is just ignoring to dispatch the click event. Otherwise your
dispatching the click event.
Of course is a simple workaround to be done and maybe a feature that is not
used by a lot of people, but won't mess with the functionality of
UIComponent, it will be available only if you set doubleClickEnabled, but I
think that UIComponent should be the class to have this because I already
had the same request on a Group, Button and on a ItemRenderer.


On Fri, Apr 20, 2012 at 6:20 PM, Alex Harui <> wrote:

> On 4/20/12 8:43 AM, "andrei apostolache" <>
> wrote:
> > Hi Scott,
> >
> > Is not about a new component, it's about all spark components that are
> > based on UIComponent. Think for example a simple spark button, <s:Button
> > click="doSomething()" doubleClick="doSomethingElse()"
> > doubleClickEnabled="true" /> if you will try to double click the button
> > first it will trigger doSomething() and then doSomethingElse(), while the
> > expectation would be: click received (should obfuscate it for 300 ms to
> see
> > if the user is going for a double click), if second click happens trigger
> > doSomethingElse(), otherwise trigger doSomething().
> >
> These requests are why we need to find an efficient plug-in model for the
> SDK.  Then you can alter this behavior and not mess up someone who does
> need
> the click when it happens.
> --
> Alex Harui
> Flex SDK Team
> Adobe Systems, Inc.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message