Re: [flexcoders] RadioButton change event not firing in Flex 3 when button in group is deselected

2008-06-27 Thread Jonathan Branam
You should use svn diff. I usually do it from within Eclipse. It has a
command called Create a Patch or something. But I think just:

svn diff  patch.txt

will work.

On Fri, Jun 27, 2008 at 1:22 AM, Josh McDonald [EMAIL PROTECTED] wrote:

   The problem's in RadioButtonGroup, I've posted the details to the bug.

 Alex,

 I've got Contrib permission, but the submit a patch document just talks
 about TortoiseSVN. Is the patch file I need to submit simply:

 diff /path/to/checkout/foo.as /path/to/new/foo.as  mypatch.diff

 Just using standard BSD Diff (OS X)? Or have I got the operands in the
 wrong order, or is it not standard diff at all?

 -Josh

 RadioButton.click simply calls out to group.selection

 On Fri, Jun 27, 2008 at 2:31 PM, Alex Harui [EMAIL PROTECTED] wrote:

  It looks like it was done to prevent events for programmatic changes to
 .selected which would be correct, but the RBG programmatically unselects an
 RB and this code now prevents an event which probably should fire.


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Josh McDonald
 *Sent:* Thursday, June 26, 2008 3:44 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] RadioButton change event not firing in Flex 3
 when button in group is deselected



 It makes more sense to me to be for Radiobutton than Checkbox. Why on
 earth would you not want to get a change event when a checkbox is unchecked?

 -Josh

 On Fri, Jun 27, 2008 at 2:48 AM, Samuel Neff [EMAIL PROTECTED]
 wrote:

 Thanks for confirming.  Bug filed.

 https://bugs.adobe.com/jira/browse/SDK-15918

 Best regards,



 Sam

 -
 We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer
 in the Washington D.C. Contact [EMAIL PROTECTED]

 On Thu, Jun 26, 2008 at 11:51 AM, Alex Harui [EMAIL PROTECTED] wrote:

 That's what I figured, just wanted to confirm.  I still think the change
 (which was for CheckBox) had unintended consequences in RadioButton, so file
 a bug.





 __._,_




 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]




 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]
  



Re: [flexcoders] RadioButton change event not firing in Flex 3 when button in group is deselected

2008-06-27 Thread Josh McDonald
Not using eclipse' SVN, I hate it :) I went with regular old diff. I can
always re-submit it again some time, but I'm not recompiling the whole
source since that'd take weeks (exaggerating only a little), Flex's compiler
ain't quick. I'm just monkey-patching changes into my test-project source
tree.

On Sat, Jun 28, 2008 at 12:07 AM, Jonathan Branam 
[EMAIL PROTECTED] wrote:

  You should use svn diff. I usually do it from within Eclipse. It has a
 command called Create a Patch or something. But I think just:

 svn diff  patch.txt

 will work.


 On Fri, Jun 27, 2008 at 1:22 AM, Josh McDonald [EMAIL PROTECTED] wrote:

   The problem's in RadioButtonGroup, I've posted the details to the bug.

 Alex,

 I've got Contrib permission, but the submit a patch document just talks
 about TortoiseSVN. Is the patch file I need to submit simply:

 diff /path/to/checkout/foo.as /path/to/new/foo.as  mypatch.diff

 Just using standard BSD Diff (OS X)? Or have I got the operands in the
 wrong order, or is it not standard diff at all?

 -Josh

 RadioButton.click simply calls out to group.selection

 On Fri, Jun 27, 2008 at 2:31 PM, Alex Harui [EMAIL PROTECTED] wrote:

  It looks like it was done to prevent events for programmatic changes to
 .selected which would be correct, but the RBG programmatically unselects an
 RB and this code now prevents an event which probably should fire.


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Josh McDonald
 *Sent:* Thursday, June 26, 2008 3:44 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] RadioButton change event not firing in Flex
 3 when button in group is deselected



 It makes more sense to me to be for Radiobutton than Checkbox. Why on
 earth would you not want to get a change event when a checkbox is unchecked?

 -Josh

 On Fri, Jun 27, 2008 at 2:48 AM, Samuel Neff [EMAIL PROTECTED]
 wrote:

 Thanks for confirming.  Bug filed.

 https://bugs.adobe.com/jira/browse/SDK-15918

 Best regards,



 Sam

 -
 We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer
 in the Washington D.C. Contact [EMAIL PROTECTED]

 On Thu, Jun 26, 2008 at 11:51 AM, Alex Harui [EMAIL PROTECTED] wrote:

 That's what I figured, just wanted to confirm.  I still think the change
 (which was for CheckBox) had unintended consequences in RadioButton, so file
 a bug.





 __._,_




 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]




 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]


 




-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


RE: [flexcoders] RadioButton change event not firing in Flex 3 when button in group is deselected

2008-06-27 Thread Alex Harui
Yeah, we want SVN patches.  They're supposedly easier to manage.  I
assume there isn't much to this fix so we can probably work from the
diff.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh McDonald
Sent: Friday, June 27, 2008 7:16 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] RadioButton change event not firing in Flex 3
when button in group is deselected

 

Not using eclipse' SVN, I hate it :) I went with regular old diff. I can
always re-submit it again some time, but I'm not recompiling the whole
source since that'd take weeks (exaggerating only a little), Flex's
compiler ain't quick. I'm just monkey-patching changes into my
test-project source tree.

On Sat, Jun 28, 2008 at 12:07 AM, Jonathan Branam
[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

You should use svn diff. I usually do it from within Eclipse. It has a
command called Create a Patch or something. But I think just:

svn diff  patch.txt

will work.

 

On Fri, Jun 27, 2008 at 1:22 AM, Josh McDonald [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

The problem's in RadioButtonGroup, I've posted the details to the bug. 

Alex, 

I've got Contrib permission, but the submit a patch document just
talks about TortoiseSVN. Is the patch file I need to submit simply:

diff /path/to/checkout/foo.as /path/to/new/foo.as  mypatch.diff

Just using standard BSD Diff (OS X)? Or have I got the operands in the
wrong order, or is it not standard diff at all?

-Josh

RadioButton.click simply calls out to group.selection 

 

On Fri, Jun 27, 2008 at 2:31 PM, Alex Harui [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

It looks like it was done to prevent events for programmatic changes to
.selected which would be correct, but the RBG programmatically unselects
an RB and this code now prevents an event which probably should fire.

 



From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ]
On Behalf Of Josh McDonald
Sent: Thursday, June 26, 2008 3:44 PM


To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com 
Subject: Re: [flexcoders] RadioButton change event not firing in Flex 3
when button in group is deselected

 

It makes more sense to me to be for Radiobutton than Checkbox. Why on
earth would you not want to get a change event when a checkbox is
unchecked?

-Josh

On Fri, Jun 27, 2008 at 2:48 AM, Samuel Neff [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

Thanks for confirming.  Bug filed.

https://bugs.adobe.com/jira/browse/SDK-15918
https://bugs.adobe.com/jira/browse/SDK-15918 

Best regards,



Sam

-
We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer
in the Washington D.C. Contact [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  

On Thu, Jun 26, 2008 at 11:51 AM, Alex Harui [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

That's what I figured, just wanted to confirm.  I still think the change
(which was for CheckBox) had unintended consequences in RadioButton, so
file a bug.

 

 

__._,_




-- 
Therefore, send not to know For whom the bell tolls. It tolls for
thee.

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  




-- 
Therefore, send not to know For whom the bell tolls. It tolls for
thee.

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  








-- 
Therefore, send not to know For whom the bell tolls. It tolls for
thee.

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  

 



Re: [flexcoders] RadioButton change event not firing in Flex 3 when button in group is deselected

2008-06-27 Thread Jonathan Branam
I found the command line tools to compile the Flex SDK to be very speedy for
the amount of code it's working with. I just use eclipse for editing and
SVN. It really doesn't take much time at all. Its FB3 that's apparently so
slow. Either that or the framework code is easier to compile than my app,
because it certainly has more code in it. I would recommend getting familiar
with building the Flex SDK from source if you're planning to submit patches.

On Fri, Jun 27, 2008 at 10:15 AM, Josh McDonald [EMAIL PROTECTED] wrote:

   Not using eclipse' SVN, I hate it :) I went with regular old diff. I can
 always re-submit it again some time, but I'm not recompiling the whole
 source since that'd take weeks (exaggerating only a little), Flex's compiler
 ain't quick. I'm just monkey-patching changes into my test-project source
 tree.


 On Sat, Jun 28, 2008 at 12:07 AM, Jonathan Branam 
 [EMAIL PROTECTED] wrote:

  You should use svn diff. I usually do it from within Eclipse. It has a
 command called Create a Patch or something. But I think just:

 svn diff  patch.txt

 will work.


 On Fri, Jun 27, 2008 at 1:22 AM, Josh McDonald [EMAIL PROTECTED] wrote:

   The problem's in RadioButtonGroup, I've posted the details to the bug.


 Alex,

 I've got Contrib permission, but the submit a patch document just talks
 about TortoiseSVN. Is the patch file I need to submit simply:

 diff /path/to/checkout/foo.as /path/to/new/foo.as  mypatch.diff

 Just using standard BSD Diff (OS X)? Or have I got the operands in the
 wrong order, or is it not standard diff at all?

 -Josh

 RadioButton.click simply calls out to group.selection

 On Fri, Jun 27, 2008 at 2:31 PM, Alex Harui [EMAIL PROTECTED] wrote:

  It looks like it was done to prevent events for programmatic changes
 to .selected which would be correct, but the RBG programmatically unselects
 an RB and this code now prevents an event which probably should fire.


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
 *On Behalf Of *Josh McDonald
 *Sent:* Thursday, June 26, 2008 3:44 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] RadioButton change event not firing in Flex
 3 when button in group is deselected



 It makes more sense to me to be for Radiobutton than Checkbox. Why on
 earth would you not want to get a change event when a checkbox is 
 unchecked?

 -Josh

 On Fri, Jun 27, 2008 at 2:48 AM, Samuel Neff [EMAIL PROTECTED]
 wrote:

 Thanks for confirming.  Bug filed.

 https://bugs.adobe.com/jira/browse/SDK-15918

 Best regards,



 Sam

 -
 We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer
 in the Washington D.C. Contact [EMAIL PROTECTED]

 On Thu, Jun 26, 2008 at 11:51 AM, Alex Harui [EMAIL PROTECTED] wrote:

 That's what I figured, just wanted to confirm.  I still think the change
 (which was for CheckBox) had unintended consequences in RadioButton, so 
 file
 a bug.





 __._,_




 --
 Therefore, send not to know For whom the bell tolls. It tolls for
 thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]




 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]
  



Re: [flexcoders] RadioButton change event not firing in Flex 3 when button in group is deselected

2008-06-27 Thread Josh McDonald
Yeah planning on it, only checked it all out a couple of days ago, so I
haven't messed about with it much. I'll figure out SVN diff, and re-submit
any patches I cooked up with regular diff :)

On Sat, Jun 28, 2008 at 3:18 AM, Jonathan Branam 
[EMAIL PROTECTED] wrote:

  I found the command line tools to compile the Flex SDK to be very speedy
 for the amount of code it's working with. I just use eclipse for editing and
 SVN. It really doesn't take much time at all. Its FB3 that's apparently so
 slow. Either that or the framework code is easier to compile than my app,
 because it certainly has more code in it. I would recommend getting familiar
 with building the Flex SDK from source if you're planning to submit patches.



-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


Re: [flexcoders] RadioButton change event not firing in Flex 3 when button in group is deselected

2008-06-26 Thread Samuel Neff
Alex,

We're listening to the button and not the group because we can easily bind
our button to our datamodel but listening to the group requires more manual
work on our part.  So we go from a simple binding expression to a more
complex loop which simply redoes the same work that RadioButtonGroup already
does.  Additionally, this is old code that worked in Flex 2, if we were
developing from scratch in Flex 3 I don't think we would have run into this
problem as we would simply have accepted the strange behavior.


Josh,

Where do you see this documented?  The Button documentation states  For the
RadioButton controls, this event is dispatched when the selected property
changes and this event is dispatched only when the user interacts with the
control by using the mouse but that is not the case.. user clicks a radio
button, the selected property changes, but the event is not broadcast.

The code you posted, which is the same as the code I posted in my original
e-mail, shows that the change to Button was intentional but I'm not sure if
the repercussions that had on RadioButton were also intentional.


Thanks,

Sam

-
We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer in
the Washington D.C. Contact [EMAIL PROTECTED]

On Thu, Jun 26, 2008 at 1:24 AM, Josh McDonald [EMAIL PROTECTED] wrote:

  Looks like intended behaviour, and the bug is in the documentation. From
 Button.as:

 ...
 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED] 



RE: [flexcoders] RadioButton change event not firing in Flex 3 when button in group is deselected

2008-06-26 Thread Alex Harui
That's what I figured, just wanted to confirm.  I still think the change
(which was for CheckBox) had unintended consequences in RadioButton, so
file a bug.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Samuel Neff
Sent: Thursday, June 26, 2008 7:17 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] RadioButton change event not firing in Flex 3
when button in group is deselected

 

Alex,

We're listening to the button and not the group because we can easily
bind our button to our datamodel but listening to the group requires
more manual work on our part.  So we go from a simple binding expression
to a more complex loop which simply redoes the same work that
RadioButtonGroup already does.  Additionally, this is old code that
worked in Flex 2, if we were developing from scratch in Flex 3 I don't
think we would have run into this problem as we would simply have
accepted the strange behavior.


Josh,

Where do you see this documented?  The Button documentation states  For
the RadioButton controls, this event is dispatched when the selected
property changes and this event is dispatched only when the user
interacts with the control by using the mouse but that is not the
case.. user clicks a radio button, the selected property changes, but
the event is not broadcast.

The code you posted, which is the same as the code I posted in my
original e-mail, shows that the change to Button was intentional but I'm
not sure if the repercussions that had on RadioButton were also
intentional.


Thanks,

Sam

-
We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer
in the Washington D.C. Contact [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  

On Thu, Jun 26, 2008 at 1:24 AM, Josh McDonald [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

Looks like intended behaviour, and the bug is in the documentation. From
Button.as:

...

 

-- 
Therefore, send not to know For whom the bell tolls. It tolls for
thee.

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  

 

 



Re: [flexcoders] RadioButton change event not firing in Flex 3 when button in group is deselected

2008-06-26 Thread Samuel Neff
Thanks for confirming.  Bug filed.

https://bugs.adobe.com/jira/browse/SDK-15918

Best regards,

Sam

-
We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer in
the Washington D.C. Contact [EMAIL PROTECTED]

On Thu, Jun 26, 2008 at 11:51 AM, Alex Harui [EMAIL PROTECTED] wrote:

  That's what I figured, just wanted to confirm.  I still think the change
 (which was for CheckBox) had unintended consequences in RadioButton, so file
 a bug.





Re: [flexcoders] RadioButton change event not firing in Flex 3 when button in group is deselected

2008-06-26 Thread Josh McDonald
It makes more sense to me to be for Radiobutton than Checkbox. Why on earth
would you not want to get a change event when a checkbox is unchecked?

-Josh

On Fri, Jun 27, 2008 at 2:48 AM, Samuel Neff [EMAIL PROTECTED] wrote:

  Thanks for confirming.  Bug filed.

 https://bugs.adobe.com/jira/browse/SDK-15918

 Best regards,

 Sam

 -
 We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer in
 the Washington D.C. Contact [EMAIL PROTECTED]

 On Thu, Jun 26, 2008 at 11:51 AM, Alex Harui [EMAIL PROTECTED] wrote:

  That's what I figured, just wanted to confirm.  I still think the change
 (which was for CheckBox) had unintended consequences in RadioButton, so file
 a bug.




 __._,_




-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


RE: [flexcoders] RadioButton change event not firing in Flex 3 when button in group is deselected

2008-06-26 Thread Alex Harui
It looks like it was done to prevent events for programmatic changes to
.selected which would be correct, but the RBG programmatically unselects
an RB and this code now prevents an event which probably should fire.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh McDonald
Sent: Thursday, June 26, 2008 3:44 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] RadioButton change event not firing in Flex 3
when button in group is deselected

 

It makes more sense to me to be for Radiobutton than Checkbox. Why on
earth would you not want to get a change event when a checkbox is
unchecked?

-Josh

On Fri, Jun 27, 2008 at 2:48 AM, Samuel Neff [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

Thanks for confirming.  Bug filed.

https://bugs.adobe.com/jira/browse/SDK-15918
https://bugs.adobe.com/jira/browse/SDK-15918 

Best regards,



Sam

-
We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer
in the Washington D.C. Contact [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  

On Thu, Jun 26, 2008 at 11:51 AM, Alex Harui [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

That's what I figured, just wanted to confirm.  I still think the change
(which was for CheckBox) had unintended consequences in RadioButton, so
file a bug.

 

 

__._,_




-- 
Therefore, send not to know For whom the bell tolls. It tolls for
thee.

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  

 



Re: [flexcoders] RadioButton change event not firing in Flex 3 when button in group is deselected

2008-06-26 Thread Josh McDonald
The problem's in RadioButtonGroup, I've posted the details to the bug.

Alex,

I've got Contrib permission, but the submit a patch document just talks
about TortoiseSVN. Is the patch file I need to submit simply:

diff /path/to/checkout/foo.as /path/to/new/foo.as  mypatch.diff

Just using standard BSD Diff (OS X)? Or have I got the operands in the wrong
order, or is it not standard diff at all?

-Josh

RadioButton.click simply calls out to group.selection

On Fri, Jun 27, 2008 at 2:31 PM, Alex Harui [EMAIL PROTECTED] wrote:

  It looks like it was done to prevent events for programmatic changes to
 .selected which would be correct, but the RBG programmatically unselects an
 RB and this code now prevents an event which probably should fire.


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Josh McDonald
 *Sent:* Thursday, June 26, 2008 3:44 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] RadioButton change event not firing in Flex 3
 when button in group is deselected



 It makes more sense to me to be for Radiobutton than Checkbox. Why on earth
 would you not want to get a change event when a checkbox is unchecked?

 -Josh

 On Fri, Jun 27, 2008 at 2:48 AM, Samuel Neff [EMAIL PROTECTED]
 wrote:

 Thanks for confirming.  Bug filed.

 https://bugs.adobe.com/jira/browse/SDK-15918

 Best regards,



 Sam

 -
 We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer in
 the Washington D.C. Contact [EMAIL PROTECTED]

 On Thu, Jun 26, 2008 at 11:51 AM, Alex Harui [EMAIL PROTECTED] wrote:

 That's what I figured, just wanted to confirm.  I still think the change
 (which was for CheckBox) had unintended consequences in RadioButton, so file
 a bug.





 __._,_




 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]
  




-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


[flexcoders] RadioButton change event not firing in Flex 3 when button in group is deselected

2008-06-25 Thread Samuel Neff
In Flex 3 when you have radio buttons in a group and click on one of the
radio buttons, only the change event for the clicked-on radio button fires.
The radio button that was previously selected does not dispatch a change
event (it did in Flex 2).

This behavior can be overridden by the Flex 2 compatibility flag, but it's
not mentioned in the compatibility document as far as I can tell

http://learn.adobe.com/wiki/display/Flex/Backwards+Compatibility+Issues

For example, run the following code with Flex 2 SDK:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical
mx:RadioButton id=b1 label=1 change=trace('1 changed:' +
b1.selected); /
mx:RadioButton id=b2 label=2 change=trace('2 changed:' +
b2.selected); /
mx:RadioButton id=b3 label=3 change=trace('3 changed:' +
b3.selected); /
/mx:Application

click on one gives..

1 changed:true

then clicking on 2 gives...

2 changed:true
1 changed:false

and clicking on 3 gives...

3 changed:true
2 changed:false


however, if you then run the same code with Flex 3 SDK, you get:


click on one gives..

1 changed:true

then clicking on 2 gives...

2 changed:true

and clicking on 3 gives...

3 changed:true

so in Flex 3 you never get the change events when the old radio buttons are
set to selected=false.

Here's the changed code that I think causes the problem.


if (FlexVersion.compatibilityVersion  FlexVersion.VERSION_3_0)
{
 if (toggle)
dispatchEvent(new Event(Event.CHANGE));
}
else
{
if (toggle  !isProgrammatic)
dispatchEvent(new Event(Event.CHANGE));
}


is this really correct behavior?  Why wouldn't you want the change event to
fire when the value changed?  There's an isProgrammatic check in there, but
this is not really a programmatic change, it's in response to a user
clicking on a different radio button in the group.

Thanks,

Sam


-
We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer in
the Washington D.C. Contact [EMAIL PROTECTED]


RE: [flexcoders] RadioButton change event not firing in Flex 3 when button in group is deselected

2008-06-25 Thread Alex Harui
I'd say it is a bug.  Why are you listening to each button instead of
the group?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Samuel Neff
Sent: Wednesday, June 25, 2008 1:11 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] RadioButton change event not firing in Flex 3 when
button in group is deselected

 

In Flex 3 when you have radio buttons in a group and click on one of the
radio buttons, only the change event for the clicked-on radio button
fires.  The radio button that was previously selected does not dispatch
a change event (it did in Flex 2).

This behavior can be overridden by the Flex 2 compatibility flag, but
it's not mentioned in the compatibility document as far as I can tell

http://learn.adobe.com/wiki/display/Flex/Backwards+Compatibility+Issues
http://learn.adobe.com/wiki/display/Flex/Backwards+Compatibility+Issues
 

For example, run the following code with Flex 2 SDK:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml  layout=vertical
mx:RadioButton id=b1 label=1 change=trace('1 changed:' +
b1.selected); /
mx:RadioButton id=b2 label=2 change=trace('2 changed:' +
b2.selected); /
mx:RadioButton id=b3 label=3 change=trace('3 changed:' +
b3.selected); /
/mx:Application

click on one gives..

1 changed:true

then clicking on 2 gives...

2 changed:true
1 changed:false

and clicking on 3 gives...

3 changed:true
2 changed:false


however, if you then run the same code with Flex 3 SDK, you get:


click on one gives..

1 changed:true

then clicking on 2 gives...

2 changed:true

and clicking on 3 gives...

3 changed:true

so in Flex 3 you never get the change events when the old radio buttons
are set to selected=false.

Here's the changed code that I think causes the problem.


if (FlexVersion.compatibilityVersion 
FlexVersion.VERSION_3_0)
{
 if (toggle)
dispatchEvent(new Event(Event.CHANGE));
}
else
{
if (toggle  !isProgrammatic)
dispatchEvent(new Event(Event.CHANGE));
}


is this really correct behavior?  Why wouldn't you want the change event
to fire when the value changed?  There's an isProgrammatic check in
there, but this is not really a programmatic change, it's in response to
a user clicking on a different radio button in the group.

Thanks,

Sam


-
We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer
in the Washington D.C. Contact [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  

 



Re: [flexcoders] RadioButton change event not firing in Flex 3 when button in group is deselected

2008-06-25 Thread Josh McDonald
Looks like intended behaviour, and the bug is in the documentation. From
Button.as:

/**
 *  @private
 */
public function set selected(value:Boolean):void
{
selectedSet = true;
setSelected(value, true);
}

mx_internal function setSelected(value:Boolean,
 isProgrammatic:Boolean = false):void
{
if (_selected != value)
{
_selected = value;

invalidateDisplayList();

if (FlexVersion.compatibilityVersion  FlexVersion.VERSION_3_0)
{
 if (toggle)
dispatchEvent(new Event(Event.CHANGE));
}
else
{
if (toggle  !isProgrammatic)
dispatchEvent(new Event(Event.CHANGE));
}
dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
}
}

On Thu, Jun 26, 2008 at 2:45 PM, Alex Harui [EMAIL PROTECTED] wrote:

  I'd say it is a bug.  Why are you listening to each button instead of the
 group?





-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]