Hi Mark,

Interesting idea. I was thinking: wouldn't it be more convenient to let all that happen through one property of type Array? Lets' call it `disabledButtons:Array`; it would disable the items in the Array en enable those not in the Array.

That way this code from your test app

            if (dgTestData.isFirstRow == true)
            {
                bbTest.buttonDisable("First");
                bbTest.buttonDisable("Previous");
            }
            else
            {
                bbTest.buttonEnable("First");
                bbTest.buttonEnable("Previous");
            }

would become

            if (dgTestData.isFirstRow == true)
                bbTest.disabledButtons = ["First", "Previous"];

and as another plus, you could use binding on that property through MXML. Something like:

            <s:ButtonBar disabledButtons="{disabledButtonsArray}"/>

What do you think?
Max

Reply via email to