Return-Path: X-Original-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 52A3C98D3 for ; Sat, 21 Apr 2012 17:55:09 +0000 (UTC) Received: (qmail 94374 invoked by uid 500); 21 Apr 2012 17:55:08 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 94349 invoked by uid 500); 21 Apr 2012 17:55:08 -0000 Mailing-List: contact flex-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-dev@incubator.apache.org Delivered-To: mailing list flex-dev@incubator.apache.org Received: (qmail 94340 invoked by uid 99); 21 Apr 2012 17:55:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Apr 2012 17:55:08 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of apostolache.andrei@gmail.com designates 209.85.220.175 as permitted sender) Received: from [209.85.220.175] (HELO mail-vx0-f175.google.com) (209.85.220.175) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Apr 2012 17:55:02 +0000 Received: by vcbfl13 with SMTP id fl13so8027047vcb.6 for ; Sat, 21 Apr 2012 10:54:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=wi4HvCub5uJssP0C5EJ2OtPizd7GpePHSFiT0VOyN1s=; b=LpOixzxteG912GXdnXl3+PoVLt8JH+3t/kovu8DNfBLRoWY3ZLKg6cok/hltZWI/w2 PozQDOLITM/8OZ9t4Lw8hJHklyZ4eVwksAslrK5zf9kKw+PSFcmxjLV7n59JbW4PHMA8 OomFdV+DASlD3ST7bwjCz7FZnhyliUYIbidhQc/XJ4gkU80WFxsA1loqlWCfNVN1LfQ8 UDGdTxj2lY3R6aDX3VJfV/e+0tIzBHp32GULo8gHGqlJUvhCk0bi0ZFA05x/ZwY7e8da gfiiLi/z7/8O7zrZlbpKNksDhZiv+Z1dGktwCFzkb52Tlo8EQnTa8ZMNsSNupe38GeLh BT3Q== MIME-Version: 1.0 Received: by 10.220.40.73 with SMTP id j9mr2957113vce.63.1335030881718; Sat, 21 Apr 2012 10:54:41 -0700 (PDT) Received: by 10.220.1.17 with HTTP; Sat, 21 Apr 2012 10:54:41 -0700 (PDT) In-Reply-To: References: Date: Sat, 21 Apr 2012 18:54:41 +0100 Message-ID: Subject: Re: [Proposal] Different behaviour on click and doubleClick on UIComponent From: andrei apostolache To: flex-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=bcaec54eed0a7812a404be34193d X-Virus-Checked: Checked by ClamAV on apache.org --bcaec54eed0a7812a404be34193d Content-Type: text/plain; charset=UTF-8 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. Regards, Andrei. 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, > 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. > http://blogs.adobe.com/aharui > > --bcaec54eed0a7812a404be34193d--