Hi Mark,

My personal preference is for #2, but only slightly.  IMO, fewer APIs are
better as long as they are discoverable, but you can go with #1 if you want.
My only thought was that it appears that at least internally most of the
code could be in a setButtonEnabled() method and even the array version
would just call that method.

-Alex


On 5/3/13 5:01 PM, "Mark Kessler" <[email protected]> wrote:

> Alex,
>    Give me an opinion which of these you prefer.  I have a few sets of
> changes I could use.  I will apply the same logic for the array based ones
> too.
> 
> 1.  Keep the existing named methods (disableButton/enabledButton) and move
> 70% of code to a button index lookup method which they both call.
> 
> 2.  Combine the 2 methods (disableButton/enabledButton) into one method
> with an extra property requirement "setButtonEnabled(buttonLabel,
> enabledValue, optionalFieldName)".
> 
> 3.  Both options
> 
> 
> -Mark
> 
> On Thu, May 2, 2013 at 11:44 PM, Alex Harui <[email protected]> wrote:
> 
>> Hey Mark,
>> 
>> Do you think it is worth trying to have all of these APIs call a common
>> function?  I think I'm seeing the same code more than once.
>> 
>> 

-- 
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui

Reply via email to