Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SQLite / MVC pattern

69 views
Skip to first unread message

APE

unread,
Mar 29, 2021, 7:13:02 AM3/29/21
to
Hello community,
I am using SQLite and TkTable, and would like to have advice on how to display data in the tables properly : I usually set both data in database (using SQL INSERT or UPDATE) and in display table (set table($row,$col) ... ) in the same edition functions.
But considering MVC pattern logic, it would be better if the database modification notifies the table to update the display, so the operations would be 1) user edit displayed table 2) corresponding SQL operations are performed to modify the database and 3) the database notifies the change in display.
Any Tcl best practice for this ? Or some experience to share ?
Thanks !

lamuzz...@gmail.com

unread,
Mar 29, 2021, 11:25:38 AM3/29/21
to
Well, i usually use the pair browse/tktable with edit/window (modal with ok and cancel option). If ok, then the bd table is updated and the tktable is reloaded. On my case, that's enough and works. Some years ago, i've used gridplus2 of Adrian Davis, a very ligth frame with options for BD crud, validations, etc.. Altough seems discontinued may be give you some idea for simples programs.
Saludos,
Alejandro

APE

unread,
Mar 30, 2021, 7:48:23 PM3/30/21
to
Thanks for suggestion on gridplus2, I will look further.
Adrien
0 new messages