Double click event not fired and if fired then single click is also fired?

591 views
Skip to first unread message

Arpan Srivastava

unread,
Aug 8, 2007, 12:22:32 AM8/8/07
to Flex_India
Hi All,

    In my application i have a datagrid with itemrenderer as charts and I need have to perform two operations - one on single click and one on double click - on the chart. but most of the times double click event is not fired and if fired then single click is also fired. Can I stop single click event if double click event is fired ?


Thanks
arpan

Raghunath Rao

unread,
Aug 10, 2007, 6:38:09 AM8/10/07
to flex_...@googlegroups.com
Hi Arpan,

Unfortunately there's no solution I know which can get
this done directly.
The way to go is the age old way of Flash, where you
need to use a timer
to delay the handling of the click event.

If within the time, a doubleClick is not dispatched,
handle click or if
it doesnt then handle click
Also i want to point out that if you are using a
DG(dataGrid), its
better to go for itemClick & itemDoubleClick event
than the normal click
& doubleClick events...

You can find the explanation and code here -
http://raghuonflex.wordpress.com/2007/08/10/assigning-different-behaviors-on-click-doubleclick/

Thanks
Raghu

--

Raghunath Rao
Engineer, Flex Framework
Adobe Systems, Bangalore
--~--~---------~--~----~----------------------~-------~--~
The opinions and views expressed here are purely my
own
and are in no way endorsed by my company (Adobe
Systems)
-~----------~----~----~----~------~----~-----------------~


____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
http://farechase.yahoo.com/

raghuonflex.vcf

Raghunath Rao

unread,
Aug 10, 2007, 6:59:05 AM8/10/07
to flex_...@googlegroups.com
Sorry... Some typo in there :)

"If within the time, a doubleClick is not dispatched, handle click or if it doesnt then handle click. Also i  want to point out that if you are using a DG(dataGrid), its better to go for itemClick & itemDoubleClick event than the normal click & doubleClick events..."

What i meant was...

"If within the time, a doubleClick is not dispatched, handle click or if it does then handle only double click. Also i want to point out that if you are using a DG(dataGrid), its better to go for itemClick & itemDoubleClick event than the normal click & doubleClick events..."

Thanks
Raghu
-- 

Raghunath Rao
Engineer, Flex Framework
Adobe Systems, Bangalore
--~--~---------~--~----~----------------------~-------~--~
The opinions and views expressed here are purely my own 
and are in no way endorsed by my company (Adobe Systems)
-~----------~----~----~----~------~----~-----------------~


Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV.

raghuonflex.vcf

sandeep mk

unread,
Aug 10, 2007, 6:51:16 AM8/10/07
to flex_...@googlegroups.com
Hello Raghu,
 
 
   is there a way to call servlet in flex mxml application or
   using jsp( using flex tag lib) hoe to call a servlet .
 
Please reply me.
 
sandeep.
 

Arpan Srivastava

unread,
Aug 10, 2007, 9:56:16 AM8/10/07
to flex_...@googlegroups.com
Hi Raghu,

     Thanks for the solution. I also tried the same thing using Timer class, but i think your's is a better solution.

Thanks,
Arpan

On 8/10/07, Raghunath Rao <raghu...@yahoo.com> wrote:
Reply all
Reply to author
Forward
0 new messages