4b2177983d
This is a bit cleaner than our former method of an if ... else chain of handlers. Store handlers in the menu.handlers table so that they may be added to or removed dynamically. All handlers take the current menu and selected entry as parameters, and their return value indicates whether the menu processor should continue or not. An omitted return value or 'true' will indicate that we should continue, while returning 'false' will indicate that we should exit the current menu. The omitted return value behavior is due to continuing the loop being the more common situation.