You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Tucsonjhall <Jh...@cactusware.com> on 2018/07/14 14:00:45 UTC
Enable/Disable MenuItems before Display
I must not be approaching this common task correctly. I have a native menu on
an AIR application and want to determine which subitems should be enabled
before displaying. I have yet to fall upon a way to capture an event when,
let's say, the File menu is clicked but before the menuitems under it are
displayed. Suggestions?
--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Re: Enable/Disable MenuItems before Display
Posted by Javier Guerrero García <ja...@gmail.com>.
Can't you just bind the enabled property of your nativemenuitems to
whatever expression gives you the availability of the item, no matter if
it's shown or not, so you are sure it's always in the correct state?
https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/NativeMenuItem.html#enabled
On Sat, Jul 14, 2018 at 4:00 PM, Tucsonjhall <Jh...@cactusware.com> wrote:
> I must not be approaching this common task correctly. I have a native menu
> on
> an AIR application and want to determine which subitems should be enabled
> before displaying. I have yet to fall upon a way to capture an event when,
> let's say, the File menu is clicked but before the menuitems under it are
> displayed. Suggestions?
>
>
>
> --
> Sent from: http://apache-flex-users.2333346.n4.nabble.com/
>
Re: Enable/Disable MenuItems before Display
Posted by "Frost, Andrew" <An...@Harman.com>.
I think you want to listen for the “preparing” event:
https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/NativeMenu.html#event:preparing
(Not sure the bookmark works on that link so you may just need to scroll down to very nearly the bottom of the page to see the event details..)
Hope it helps..
cheers,
Andrew
On 14 Jul 2018, at 15:01, Tucsonjhall <Jh...@cactusware.com>> wrote:
I must not be approaching this common task correctly. I have a native menu on
an AIR application and want to determine which subitems should be enabled
before displaying. I have yet to fall upon a way to capture an event when,
let's say, the File menu is clicked but before the menuitems under it are
displayed. Suggestions?
--
Sent from: https://clicktime.symantec.com/a/1/NKMNAKhM5moK42gKM_PnB2_fmesnkwcwUlsh70s8ifA=?d=hwx1C78Gl3DsWOPKC1jE6RAkaZ9h7jfxm2aDyFjc9JO8BHRsoz2B3-g53hqaPKM8zGjKlsV7i89b2lGKTpgX1eJJxUsiACWYdm0S0qvhkHWdIkxBWwXVbECcJGpnRnveVhUSlmlXApwNqCmNYnbJP8GhgRtxlKmCpB7Y5DspSoGTBRCcNXRUdq3k_0b-623oZuRrHXdxfnMKaRgKnImvSnQZNtcrgJVSklgTMVbXG2t3lwOoJHG70NkoqwopFtxyZSHaX_tR-JLSWBffGTxhJPHBbL9N2CmYPyazp3YmMdZ-ANa0RdubebnFMvv88Xm1KxON3TAkktwmMQjMLiRtAhFAjBol6pq5hMtBylNg1kYVvXsQIYycQ_qaerHdEuqwyCFgUbbTz_hYjaWUjCRidMCDHWxev7Q6&u=http%3A%2F%2Fapache-flex-users.2333346.n4.nabble.com%2F