Just for info Matt, I seen the same behavior with the button when set to toggle=true.
-----Message d'origine-----
De : [email protected] [mailto:[EMAIL PROTECTED]De la part de Matt Chotin
Envoyé : dimanche 23 avril 2006 07:46
À : [email protected]
Objet : RE: [flexcoders] Flex2b2: Question about controls and mouse events

I’ve forwarded this on, I don’t know that it makes sense either.

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Tobias Patton
Sent: Wednesday, April 19, 2006 10:50 AM
To: [email protected]
Subject: [flexcoders] Flex2b2: Question about controls and mouse events

 

Hello List;

 

One of the panels in my appliction has a check box immediately to the left of a text input field. I noticed that when I would click and drag (right to left) to select all the text in the text input, sometimes the value of the check box would change. It turns out that to change the value of the check box, all that is required is that a mouse-up event occur with the mouse above the control. I was a bit sloppy with my drag select, and was releasing the mouse beyond the left bounday of the text input, over the check box control, and thereby changing its value.

 

Is this behavior by design? In every UI framework I’ve worked with, both Windows and Macintosh, for a control to change its value there must be a mouse down within the control’s click region, followed by a mouse-up also in the click region. This allows the user to change his mind. If the user presses the mouse button over the control, he can move the pointer away from the control before releasing the button to avoid activating the control. In Flex 2b2, this is not the case. This same sequence of events activates the control. Also, in Flex 2b2, pressing the mouse button when the pointer is not over the control, then moving the pointer over the control before releasing the button changes the control’s value (as in the example above).

 

Am I the only one that thinks this behavior is non standard, and perhaps a bit unintuitive the the typical user?

 

Here’s a small application that demonstrates what I’m describing.

 

<?xml version="1.0" encoding="utf-8"?>

<mx:Application

            xmlns:mx="http://www.adobe.com/2006/mxml"

            xmlns="*"

            layout="vertical">

           

            <mx:Script>

                        <![CDATA[                

                                    private function EventHandler( event : Event ) : void

                                    {

                                                trace( event.type );

                                    }                                 

                        ]]>

            </mx:Script>

 

            <mx:HBox verticalAlign="middle" horizontalGap="2">

                        <mx:CheckBox label="Checkbox"

                                    mouseDown="EventHandler( event )"

                                    mouseUp="EventHandler( event )"

                                    buttonDown="EventHandler( event )"

                                    click="EventHandler( event )"

                                    valueCommit="EventHandler( event )"/>

                        <mx:TextInput text="Select me"/>

            </mx:HBox>

</mx:Application>

 

Thanks.
Tobias.

Kodak Graphic Communications Canada Company

Tobias Patton | Software Developer | Tel: +1.604.451.2700 ext: 5148 | mailto:[EMAIL PROTECTED] | http://www.creo.com

 




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to