Add SubMenu class
Let's say you have a rootMenu and a printMenu, I think it's weird to allow the user to enter a sub menu just for printing.
I would just like to add multiple commands to the same printMenu for a cleaner code instead of adding commands like print a, print b
The sub menu can be inherited from Menu, and when you type help for example it'd look like that:
Commands available:
- help
This help message
- exit
Quit the session
- print
A custom menu message if exists
- a
This prints a
- b
This prints b
writing just print into the main Menu can result in printing an error / the sub menu help function
Hi @T0nd0Tara ,
thank you for your contribution. I can't fully understand your suggestion, however. Are you proposing to display the entire subtree of the different submenus in the help message, as opposed to just the current menu? Or something else?
Thanks