1. Generic UI
- Posted by irv Oct 15, 2020
- 824 views
Kenneth Rhodes' Budget program has inspired me to post the code that I'm using to build the GUI for a similar program. You may be surprised to see how simple it can be if you break things up into manageable "chunks".
The four short files that define the interface are a total of only 125 lines O'Code. This is a good basic "generic" UI for the user-interface part of any number of programs, and with a bit of care to keep things organized, you can run and test the interface without having the functions called by that interface defined at all. These 4 should do that:
budget.ex
file_menu.e
table_menu.e
record_menu.e
I have already written and (mostly) tested the routines that connect to the eds functions. Separating them as completely as possible from the interface makes things much easier.
You can ask questions here or as a comment to the files, I'll try to answer.
2. Re: Generic UI
- Posted by Senator Oct 15, 2020
- 812 views
I'm posting the interface which you can run, the code to handle the database functions is written (file_funcs.e, table_funcs.e, and record_funcs.e - see list above). I'll post that later *if anyone is interested.*
Very nice, Irv! Thanks for sharing your interface framework - add me to your interested list.
Regards, Ken
3. Re: Generic UI
- Posted by irv Oct 15, 2020
- 793 views
Thanks.
I will take a break, and post the 3 final files in a couple of days. Those wrap the eds calls, which really, really need to be carefully handled, since trying to do some things (like add a record) have prerequisites, like there being a selected database, a table in that base selected, etc.
Sometimes, without those checks, things can go very wrong. I wound up with one database with 280 million records give or take. Not on purpose!