??? 08/26/10 18:52 Read: times |
#178331 - Broken and Fixed Responding to: ???'s previous message |
Just to follow up on this thread, I went ahead and broke each sub-menu off into it's own function. In order to save ram, I have one global shared state variable that is common to all submenus, since by definition, only one submenu will ever be active at a time. All submenus return a submenu "code" with code 0 being a logical "Back" or "Up" command.
The menu logic was arranged in a separate function which calls the submenu functions and takes care of the "Back" state. The end result is much cleaner looking code in which all related menu items are grouped together in small chunks and the overall menu structure can be reorganized in the menu logic function without touching the submenus. Thanks for the push, everyone! --David |