[ 
https://issues.apache.org/jira/browse/FLEX-33814?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stephan Plath updated FLEX-33814:
---------------------------------

    Description: 
The menuClickHandler method is private so I have no chance to override the 
behaviour if the button is clicked.

The default behaviour could be unwanted if I set openAlways to true. It might 
be also a good idea to add a property which allows to toggle this behaviour 
(something like "alwaysTriggerItemClickOnButtonClick"), but at first it would 
be helpful to make menuClickHandler protected so I can write a custom component 
which overrides this method.

If I could override it I would write something like this:

{code:title=MyPopUpMenuButton.as|borderStyle=solid}
override protected function menuClickHandler(event:MouseEvent):void
{
    if (!openAlways)
        super.menuClickHandler(event);
}
{code}

  was:
The menuClickHandler method is private so I have no chance to override the 
behaviour if the button is clicked.

The default behaviour could be unwanted if I set openAlways to true. It might 
be also a good idea to add a property which allows to toggle this behaviour 
(something like "alwaysTriggerItemClickOnButtonClick"), but at first it would 
be helpful to make menuClickHandler protected so I can write a custom component 
which overrides this method.

If I could override it I would write something like this:

override protected function menuClickHandler(event:MouseEvent):void
{
    if (!openAlways)
        super.menuClickHandler(event);
}


> PopUpMenuButton's menuClickHandler() should be protected
> --------------------------------------------------------
>
>                 Key: FLEX-33814
>                 URL: https://issues.apache.org/jira/browse/FLEX-33814
>             Project: Apache Flex
>          Issue Type: Improvement
>          Components: mx: PopUpMenuButton
>            Reporter: Stephan Plath
>            Priority: Trivial
>              Labels: easyfix
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> The menuClickHandler method is private so I have no chance to override the 
> behaviour if the button is clicked.
> The default behaviour could be unwanted if I set openAlways to true. It might 
> be also a good idea to add a property which allows to toggle this behaviour 
> (something like "alwaysTriggerItemClickOnButtonClick"), but at first it would 
> be helpful to make menuClickHandler protected so I can write a custom 
> component which overrides this method.
> If I could override it I would write something like this:
> {code:title=MyPopUpMenuButton.as|borderStyle=solid}
> override protected function menuClickHandler(event:MouseEvent):void
> {
>     if (!openAlways)
>         super.menuClickHandler(event);
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to