Well I definitely want to keep the single ones, but I can add an array based ones too. I'll put together an a new base method and then add the two array based enable/disable methods later on tonight. We can go over the array ones then.
On Sat, Apr 27, 2013 at 3:29 AM, RIAstar <max...@riastar.net> wrote: > 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 >