Paradox DOX 4.5 - PAL
I am trying to understand the idiomatic way to write small apps/tools.
This is for instance the
MAINMENU.SC for a simple invoice generator:
WHILE TRUE
CLEARALL
@ 2,2 ?? "| |"
@ 3,2 ?? "| INVOICING SYSTEM |"
@ 3,2 ?? "| |"
SHOWMENU
"1. CUSTOMERS - List view": "View customer list",
"2. CUSTOMERS - Record view": "View customer records",
"3. CUSTOMERS - New": "Add a new customer record",
"4. INVOICES - List view": "View invoice list",
"5. INVOICES - Record view": "View invoice records",
"6. INVOICES - New": "Add a new invoice",
"9. Exit - to PARADOX": "Closes menu and stays in PARADOX",
"0. Exit - to MSDOS": "Exits to MS-DOS"
DEFAULT "1. CUSTOMERS - List view"
TO choice
SWITCH
CASE choice = "1. CUSTOMERS - List view":
PLAY "CUSTLIST"
CASE choice = "9. Exit - to PARADOX":
QUIT
CASE choice = "0. Exit - to MS-DOS":
EXIT
ENDSWITCH
ENDWHILE
User press CUSTOMERS - List view and I do this in CUSTLIST.SC:
CLEARALL
VIEW "CUSTOMER"
WINMAX
WAIT TABLE
PROMPT "[F1] New Record [F2] View Current Record"
UNTIL "F1", "F2"
I would be expecting that once the user press F1 or F2 the system returns to the main menu loop and that the CLEARALL would erase the whole screen.
But it does not, I can see the old table view behind the menu.
I have also tried to add WINCLOSE and CLEARALL after the user presses F1/F2 without success.
Could it be an issue with DOSBox-X and the resolution (I am using 132x60)? - I have not noticed any graphical glitch while using PARADOX without programming -
Any hint from anybody who had programmed PAL back in the day would be appreciated.