Ok Max, I've created two new methods to enable/disable based on an array. I've rehosted the example in the same spot [1]. I will prob get around to renaming the methods tomorrow morning... they were just tossed on for now.
Not sure the getter/setter hosting an array of disable buttons. Then we have two dataproviders of button data. [1] http://people.apache.org/~mkessler/examples/FLEX-33524/app.swf -Mark On Sat, Apr 27, 2013 at 8:19 AM, Mark Kessler <kesslerconsult...@gmail.com>wrote: > 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 >> > >