Informix Ring Menu - Before Menu Option
Posted in 1996
Hello again everyone, Hopefully there is something I'm overlooking here (code follows). Here is the problem . . . 1.) You have a great 4gl menu with a Next and an Update option on. 2.) A user hits the Next option until the last record in the set is reached . The user selects the Delete option from the menu and deletes the last record. 3.) Everything is cool at this point. On the delete, we try to get the next record. We check the status. We know we are at the last record. So, we clear the form and pop up a message telling the user that there are no more records to be found. 4.) THE PROBLEM: The update and Delete options still display on the Menu. If the user chooses these options it will try to execute the code associated with these options and generate Nasty error messages. Is there any way, besides hardcoding flags or status variables, to either: 1.) re-execute the BEFORE MENU section of the MENU? Which in this case would HIDE all options except for "Query","Build","Options","Exit" 2.) Disable or Hide the options some other way? Here's a section of the 4gl MENU code..... snip.... MENU "CODE CROSSWALK MENU" BEFORE MENU CALL form_handle("adecodes","OD") HIDE OPTION ALL SHOW OPTION "Query","Build","Options","Exit" COMMAND KEY(Q) "Query" "Search for a code report line" IF query_form() = TRUE THEN SHOW OPTION "Delete","Next","Update" ELSE HIDE OPTION ALL SHOW OPTION "Query","Build","Options","Exit" END IF snip again.... 4gl Version is 4.11.UC2 On-line Version is 5.02.UC8 OS is OSF/1 Any and all ideas are welcome. TIA.. Ken McCoy