[Logo] TCC discussion forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Top Downloads] Top Downloads   [Groups] Back to home page 
[Register] Register /  [Login] Login 


This forum is read only and new users cannot register, please ask all new questions either using GitHub discussions, or in Arduino forum tagging @davetcc.

Allow MenuItems variable name to be set manually RSS feed
Forum Index » tcMenu Designer UI
Author Message
emptynick


Joined: Oct 9, 2020
Messages: 1
Offline
Hey,

thanks for your awesome library. I'm already doing some cool things with it.
What would be really helpful is to set the name which the UI will give a menu-item by hand.
In my case I have a few sub-menus that all contain a save-action:
- Root
-- Ethernet
--- IP
--- Save (Will generate "ActionMenuItem menuSave")
-- Wifi
--- IP
--- Save (Will also generate "ActionMenuItem menuSave")

Those two "menuSave" will then clash when compiling.

Another (similar) suggestion is for enums.
I have 10 LEDs which can be separately controlled (set color to Red, Green, Blue, ...).
In this case it will generate 10 enum-string-array which are identical.
It would be good to be able to either generate the enum-values OR add a name which references an already existing array.

Thanks again for your work.

- Christoph
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
thanks for your awesome library. I'm already doing some cool things with it.


You're welcome, I'm always glad to hear how it is used.

Those two "menuSave" will then clash when compiling.


Have you tried setting the use fully qualified names option, in the app store version, it's on the ROOT menu, on the Java version it's on the Generator page.

This gives fully qualified variable names. EG: menuEthernetSave and menuWiFiSave

But noted, in the future I'll see if it's possible to actually provide manual names, in case that is not enough.

It would be good to be able to either generate the enum-values OR add a name which references an already existing array.


For enums, we are introducing a new type at the moment called ScrollChoiceMenuItem, that will compliment rather than replace the current support for more complex cases, with this you'll have far more flexibility on how to provide the values. It can change size and values at runtime. It will be able to read values from:

* A fixed array in memory
* EEPROM storage in a fixed array (optionally cached)
* Delegate Callback function that will be asked for a string equivalent for each value.

This will give far more flexibility for enumerations, and allow for pretty much every case.
 
Forum Index » tcMenu Designer UI
Go to:   
Mobile view
Powered by JForum 2.7.0 © 2020 JForum Team • Maintained by Andowson Chang and Ulf Dittmer

This site uses cookies to analyse traffic, serve ads by Google AdSense (non-personalized in EEA/UK), and to record consent. We also embed Twitter, Youtube and Disqus content on some pages, these companies have their own privacy policies.

Our privacy policy applies to all pages on our site

Should you need further guidance on how to proceed: External link for information about cookie management.