You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Alex Harui <ah...@adobe.com> on 2013/03/23 00:37:29 UTC

Re: git commit: FLEX-33130 Added label setter/getter to interface

I'm not vetoing, but I don't like it.  A button that is just graphical
(play/pause/rewind in a video control) now must have a label?

I think I would have made an ILabelButton or something like that.


On 3/22/13 4:34 PM, "jmclean@apache.org" <jm...@apache.org> wrote:

> Updated Branches:
>   refs/heads/develop fa2108b29 -> 6846c57a5
> 
> 
> FLEX-33130 Added label setter/getter to interface
> 
> 
> Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
> Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/6846c57a
> Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/6846c57a
> Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/6846c57a
> 
> Branch: refs/heads/develop
> Commit: 6846c57a5922ddc0d8242d5eff4249412d05a936
> Parents: fa2108b
> Author: Justin Mclean <jm...@apache.org>
> Authored: Sat Mar 23 10:33:58 2013 +1100
> Committer: Justin Mclean <jm...@apache.org>
> Committed: Sat Mar 23 10:33:58 2013 +1100
> 
> ----------------------------------------------------------------------
>  .../projects/framework/src/mx/core/IButton.as      |   20 +++++++++++++++
>  1 files changed, 20 insertions(+), 0 deletions(-)
> ----------------------------------------------------------------------
> 
> 
> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/6846c57a/frameworks/proje
> cts/framework/src/mx/core/IButton.as
> ----------------------------------------------------------------------
> diff --git a/frameworks/projects/framework/src/mx/core/IButton.as
> b/frameworks/projects/framework/src/mx/core/IButton.as
> index 99765dc..14371e1 100644
> --- a/frameworks/projects/framework/src/mx/core/IButton.as
> +++ b/frameworks/projects/framework/src/mx/core/IButton.as
> @@ -52,6 +52,26 @@ public interface IButton extends IUIComponent
>       */
>      function callLater(method:Function,
>                                args:Array /* of Object */ = null):void
> +  
> + /**
> +  * Gets the text on a Button.
> +  *
> +  * @langversion 3.0
> +  * @playerversion Flash 9
> +  * @playerversion AIR 1.1
> +  * @productversion ApacheFlex 4.10
> +  */
> + function get label():String;
> + 
> + /**
> +  * Sets the text on a Button.
> +  *
> +  * @langversion 3.0
> +  * @playerversion Flash 9
> +  * @playerversion AIR 1.1
> +  * @productversion ApacheFlex 4.10
> +  */
> + function set label(value:String):void;
>  }
>  
>  }
> 

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


Re: git commit: FLEX-33130 Added label setter/getter to interface

Posted by Alex Harui <ah...@adobe.com>.


On 3/22/13 5:47 PM, "Justin Mclean" <ju...@classsoftware.com> wrote:

> Hi,
> 
>> True, but in theory some Flash-based button could implement just enough to
>> play in this game.
> 
> Would it use the IButton interface in this case? It's not exactly
> representative of what a button interface would be IMO it consists of
> emphasised (would a graphical button use this?), callLater (why is this here?)
> and now the label setter and getter.
> 
> About the only place the interface is used in the SDK is in the Focus Manager
> which set emphasised to true/false on the default button.
> 
> Someone asked for it so it was important to them. We should either keep the
> change or reject it and either way close the JIRA issue.
> 
I hadn't looked at what was already in IButton.  Not sure why callLater is
in there.  It is supposed to be the interface for emphasized

Anyway, it occurs to me that to change an interface invites potential
backward compatibility issues.  Probably low probability but just want to
point that out.

Honestly, I don't care whether you decide to keep it or not since the issues
are probably edge cases, I just wanted to point out the ramifications.

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


Re: git commit: FLEX-33130 Added label setter/getter to interface

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

> True, but in theory some Flash-based button could implement just enough to play in this game.

Would it use the IButton interface in this case? It's not exactly representative of what a button interface would be IMO it consists of emphasised (would a graphical button use this?), callLater (why is this here?) and now the label setter and getter.

About the only place the interface is used in the SDK is in the Focus Manager which set emphasised to true/false on the default button.

Someone asked for it so it was important to them. We should either keep the change or reject it and either way close the JIRA issue.

Justin

Re: git commit: FLEX-33130 Added label setter/getter to interface

Posted by Alex Harui <ah...@adobe.com>.


On 3/22/13 5:16 PM, "Justin Mclean" <ju...@classsoftware.com> wrote:

> Hi,
> 
>> I'm not vetoing, but I don't like it.  A button that is just graphical
>> (play/pause/rewind in a video control) now must have a label?
> 
> Fair point. I was just looking for low hanging fruit to pick.  However
> Button.as (both of them) and the button skins do assume all buttons have
> labels even if they are not displayed.
True, but in theory some Flash-based button could implement just enough to
play in this game.
> 
> Perhaps the button class needs to be broken up?
In the new FlexJS framework, it is.  But I wouldn't rush to do it for
current Flex.

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


Re: git commit: FLEX-33130 Added label setter/getter to interface

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

> I'm not vetoing, but I don't like it.  A button that is just graphical
> (play/pause/rewind in a video control) now must have a label?

Fair point. I was just looking for low hanging fruit to pick.  However Button.as (both of them) and the button skins do assume all buttons have labels even if they are not displayed. 

Perhaps the button class needs to be broken up?

Justin