So, really weird (I'm still using Flex 4.12.1 !):
it is the callout
when you put radiobuttons in a callout the pre-selection gets messed up
what works is to set creationComplete="myGroup.selectedIndex=1"
in the callout but ONLY if the radiobutton is NOT set to selected="true"

i think it's not the updateDisplayList function in radiobutton
I tested it like this:

public class MRadioButton extends RadioButton
    {

        public function MRadioButton()
        {
            super();
        }

override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
        {
            trace("before: " + this.group.selectedIndex);
            super.updateDisplayList(unscaledWidth, unscaledHeight);
            trace("after: " + this.group.selectedIndex);

        }

    }

when the selection got messed up, both traces showed the same, wrong index:0 (instead of 1)






Am 18.10.2015 um 22:53 schrieb Alex Harui:

On 10/18/15, 10:26 AM, "Frank Dahmen" <[email protected]> wrote:

callLater doesn't help

the radiobuttons of each group are in separate HGroups,
which are visible="false" and includeInLayout="false"
and can be shown by a checkbox

may this cause this behaviour?
although I'm asking for the groups property which is set manually to
selectedIndex=1, as said,
not for the state of a button

or more precise:
does changing the visibility and "layoutinclusion" of a radiobutton can
have an effect on the selectedIndex of the button's
group..........SOMETIMES?

I took a look at RadioButton.  There is some strange code in its
updateDisplayList method, so yes, flipping visibility could trigger an
updateDisplayList and mess up selection.  I suppose that changing visible
and includeInLayout on the Hgroup could trigger updateDisplayList on the
RadioButtons in certain scenarios, like if the browser is running the app
at different sizes on the problem machines and scrollbars are being
added/removed or the callout doesn’t display in its usual size and/or
position.

HTH,
-Alex


Reply via email to