[Royale] Menu and MenuBar

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Royale] Menu and MenuBar

Peter Ent
Hi,

I have committed a couple of new components to Royale in the develop branch of the royale-asjs Git repository. This is a brief summary.

Menu is class that lets you programmatically create and display pop-up menus. Menu uses an Array of String or an Array of Object (when you give Menu a labelField to select which item in each Object contains the label). Menu will dispatch a "change" event when an item is selected. The Menu is dismissed either by selecting an item or by selecting any where outside of the Menu itself. The Menu class does not display nested or sub-menus; it is a one-level only Menu.

MenuBar is a class that can be specified in MXML and displays a horizontal row of selectable items. MenuBar uses an Array of Objects, each Object having an item that contains an Array of menu items; these can be nested to produce a cascading set of menus. MenuBar will dispatch a "change" event when an item on any menu (or sub-menu) is selected. The menus are dismissed either by selecting an item or by selecting anywhere outside of the menus themselves.

MenuBar displays CascadingMenu instances by default. If you wish to use Menu (which is a bit lighter and does not support sub-menus), you can specify the menuClass either in MXML, ActionScript, or in a CSS style.

Please see examples/MenuExample for an example of how to use Menu and MenuBar.

Regards,
Peter Ent
Adobe Systems/Apache Royale Project

Reply | Threaded
Open this post in threaded view
|

Re: [Royale] Menu and MenuBar

Andrew Wetmore
This is great! Will you be making a blog entry about these features? Or would you like me to try to create one?

a

On Tue, Feb 27, 2018 at 11:17 AM, Peter Ent <[hidden email]> wrote:
Hi,

I have committed a couple of new components to Royale in the develop branch of the royale-asjs Git repository. This is a brief summary.

Menu is class that lets you programmatically create and display pop-up menus. Menu uses an Array of String or an Array of Object (when you give Menu a labelField to select which item in each Object contains the label). Menu will dispatch a "change" event when an item is selected. The Menu is dismissed either by selecting an item or by selecting any where outside of the Menu itself. The Menu class does not display nested or sub-menus; it is a one-level only Menu.

MenuBar is a class that can be specified in MXML and displays a horizontal row of selectable items. MenuBar uses an Array of Objects, each Object having an item that contains an Array of menu items; these can be nested to produce a cascading set of menus. MenuBar will dispatch a "change" event when an item on any menu (or sub-menu) is selected. The menus are dismissed either by selecting an item or by selecting anywhere outside of the menus themselves.

MenuBar displays CascadingMenu instances by default. If you wish to use Menu (which is a bit lighter and does not support sub-menus), you can specify the menuClass either in MXML, ActionScript, or in a CSS style.

Please see examples/MenuExample for an example of how to use Menu and MenuBar.

Regards,
Peter Ent
Adobe Systems/Apache Royale Project




--
Reply | Threaded
Open this post in threaded view
|

Re: [Royale] Menu and MenuBar

Peter Ent
Hi Andrew,

Aside from my description below, and some code, do you see anything else that would be needed? I would expand on things like showing the MXML to set up a MenuBar and how the change event would be handled. It would basically be a copy of snippets from the MenuExample.

—peter

From: Andrew Wetmore <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, February 27, 2018 at 10:48 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: [Royale] Menu and MenuBar

This is great! Will you be making a blog entry about these features? Or would you like me to try to create one?

a

On Tue, Feb 27, 2018 at 11:17 AM, Peter Ent <[hidden email]> wrote:
Hi,

I have committed a couple of new components to Royale in the develop branch of the royale-asjs Git repository. This is a brief summary.

Menu is class that lets you programmatically create and display pop-up menus. Menu uses an Array of String or an Array of Object (when you give Menu a labelField to select which item in each Object contains the label). Menu will dispatch a "change" event when an item is selected. The Menu is dismissed either by selecting an item or by selecting any where outside of the Menu itself. The Menu class does not display nested or sub-menus; it is a one-level only Menu.

MenuBar is a class that can be specified in MXML and displays a horizontal row of selectable items. MenuBar uses an Array of Objects, each Object having an item that contains an Array of menu items; these can be nested to produce a cascading set of menus. MenuBar will dispatch a "change" event when an item on any menu (or sub-menu) is selected. The menus are dismissed either by selecting an item or by selecting anywhere outside of the menus themselves.

MenuBar displays CascadingMenu instances by default. If you wish to use Menu (which is a bit lighter and does not support sub-menus), you can specify the menuClass either in MXML, ActionScript, or in a CSS style.

Please see examples/MenuExample for an example of how to use Menu and MenuBar.

Regards,
Peter Ent
Adobe Systems/Apache Royale Project




--
Reply | Threaded
Open this post in threaded view
|

Re: [Royale] Menu and MenuBar

Andrew Wetmore
I would add the "so what?": in what circumstances would I use either of these things? If I were doing the tutorial, I would point out that an app running on a mobile device with a limited screen size needs a menu so you can easily navigate through it, while an app that people will use on a computer or tablet can benefit from a menu bar and its nesting possibilities. If possible I would add a screen shot of each feature in action. That way people who are reading rapidly can see right away whether what you are talking about addresses what they are trying to do.

On Tue, Feb 27, 2018 at 4:25 PM, Peter Ent <[hidden email]> wrote:
Hi Andrew,

Aside from my description below, and some code, do you see anything else that would be needed? I would expand on things like showing the MXML to set up a MenuBar and how the change event would be handled. It would basically be a copy of snippets from the MenuExample.

—peter

From: Andrew Wetmore <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, February 27, 2018 at 10:48 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: [Royale] Menu and MenuBar

This is great! Will you be making a blog entry about these features? Or would you like me to try to create one?

a

On Tue, Feb 27, 2018 at 11:17 AM, Peter Ent <[hidden email]> wrote:
Hi,

I have committed a couple of new components to Royale in the develop branch of the royale-asjs Git repository. This is a brief summary.

Menu is class that lets you programmatically create and display pop-up menus. Menu uses an Array of String or an Array of Object (when you give Menu a labelField to select which item in each Object contains the label). Menu will dispatch a "change" event when an item is selected. The Menu is dismissed either by selecting an item or by selecting any where outside of the Menu itself. The Menu class does not display nested or sub-menus; it is a one-level only Menu.

MenuBar is a class that can be specified in MXML and displays a horizontal row of selectable items. MenuBar uses an Array of Objects, each Object having an item that contains an Array of menu items; these can be nested to produce a cascading set of menus. MenuBar will dispatch a "change" event when an item on any menu (or sub-menu) is selected. The menus are dismissed either by selecting an item or by selecting anywhere outside of the menus themselves.

MenuBar displays CascadingMenu instances by default. If you wish to use Menu (which is a bit lighter and does not support sub-menus), you can specify the menuClass either in MXML, ActionScript, or in a CSS style.

Please see examples/MenuExample for an example of how to use Menu and MenuBar.

Regards,
Peter Ent
Adobe Systems/Apache Royale Project




--



--
Reply | Threaded
Open this post in threaded view
|

Re: [Royale] Menu and MenuBar

Peter Ent
I see. I will see what I can do.
—peter

From: Andrew Wetmore <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, February 27, 2018 at 4:23 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: [Royale] Menu and MenuBar

I would add the "so what?": in what circumstances would I use either of these things? If I were doing the tutorial, I would point out that an app running on a mobile device with a limited screen size needs a menu so you can easily navigate through it, while an app that people will use on a computer or tablet can benefit from a menu bar and its nesting possibilities. If possible I would add a screen shot of each feature in action. That way people who are reading rapidly can see right away whether what you are talking about addresses what they are trying to do.

On Tue, Feb 27, 2018 at 4:25 PM, Peter Ent <[hidden email]> wrote:
Hi Andrew,

Aside from my description below, and some code, do you see anything else that would be needed? I would expand on things like showing the MXML to set up a MenuBar and how the change event would be handled. It would basically be a copy of snippets from the MenuExample.

—peter

From: Andrew Wetmore <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, February 27, 2018 at 10:48 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: [Royale] Menu and MenuBar

This is great! Will you be making a blog entry about these features? Or would you like me to try to create one?

a

On Tue, Feb 27, 2018 at 11:17 AM, Peter Ent <[hidden email]> wrote:
Hi,

I have committed a couple of new components to Royale in the develop branch of the royale-asjs Git repository. This is a brief summary.

Menu is class that lets you programmatically create and display pop-up menus. Menu uses an Array of String or an Array of Object (when you give Menu a labelField to select which item in each Object contains the label). Menu will dispatch a "change" event when an item is selected. The Menu is dismissed either by selecting an item or by selecting any where outside of the Menu itself. The Menu class does not display nested or sub-menus; it is a one-level only Menu.

MenuBar is a class that can be specified in MXML and displays a horizontal row of selectable items. MenuBar uses an Array of Objects, each Object having an item that contains an Array of menu items; these can be nested to produce a cascading set of menus. MenuBar will dispatch a "change" event when an item on any menu (or sub-menu) is selected. The menus are dismissed either by selecting an item or by selecting anywhere outside of the menus themselves.

MenuBar displays CascadingMenu instances by default. If you wish to use Menu (which is a bit lighter and does not support sub-menus), you can specify the menuClass either in MXML, ActionScript, or in a CSS style.

Please see examples/MenuExample for an example of how to use Menu and MenuBar.

Regards,
Peter Ent
Adobe Systems/Apache Royale Project




--



--