[flexcoders] Mouse Clicks' Queue when Button is Disabled

2009-02-16 Thread giladozer
Hi, I was wondering about the Disable property for UI Components.
In the docs it says that when the component is disabled it ignores all
interaction whatsoever - in particular - user interaction.
In my case, the button is disabled for a few seconds right after it
was clicked by the user (I disable it till the httprequest is returned
and then enable it).
What happens is that if the user clicks the button while it's disabled
- nothing happens. But when the button turns enabled - it acts as if
it just got the click event.
It seems like the mouse click event went into this queue and the
button listened to it right after to turned enable?
Am I correct? If so - how can I prevent this problem?
If I'm wrong, what's the reason for this? And again, how can I sort
this so the user can't send mouse clicks to the button when it's
disabled??

Many thanks :)
Gilad




RE: [flexcoders] Mouse Clicks' Queue when Button is Disabled

2009-02-16 Thread Alex Harui
I would try to find out why it gets enabled again.  Maybe the data has returned 
but is being parsed.  If so, you could wait until after parsing to re-enable 
the button.  There is no queuing of events unless the OS does it.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of giladozer
Sent: Monday, February 16, 2009 1:45 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Mouse Clicks' Queue when Button is Disabled


Hi, I was wondering about the Disable property for UI Components.
In the docs it says that when the component is disabled it ignores all
interaction whatsoever - in particular - user interaction.
In my case, the button is disabled for a few seconds right after it
was clicked by the user (I disable it till the httprequest is returned
and then enable it).
What happens is that if the user clicks the button while it's disabled
- nothing happens. But when the button turns enabled - it acts as if
it just got the click event.
It seems like the mouse click event went into this queue and the
button listened to it right after to turned enable?
Am I correct? If so - how can I prevent this problem?
If I'm wrong, what's the reason for this? And again, how can I sort
this so the user can't send mouse clicks to the button when it's
disabled??

Many thanks :)
Gilad