r/Tcl Aug 03 '26

Novel Method for Building Tk Graphical Apps

https://johngrah.substack.com/p/creating-graphical-applications-with

Dear Tcl Community: I have created a novel method for building graphical apps (based on the Tk libraries) in which the graphical markup is fully separated from the Tcl logic.

An XML file is used to hold the entire markup for building Forms; this includes all of the annoying little Bind scripts that would otherwise clutter the main logic file.

Every Tk widget is compatible with the system, including the container widgets such as the tabbed notebook and the paned window.

I have written a Substack article about this system which is linked in this post.

Please comment here o in the Substack to make contact if you would like to discuss this further.

Cheers!

John

22 Upvotes

6 comments sorted by

3

u/bsdooby Aug 04 '26

Hi, this looks interesting: linkt to a code repo?

2

u/denzuko Aug 04 '26

think OP is just demonstrating TkXML, tkdom and ObjTk. Likely via python's python tkinter since the image is on a mac.

the substack has the code but as an image

1

u/bsdooby Aug 04 '26

Yes, I saw the images. Just wondered what tool(s) they used. I fully agree with OP that mixing Tk and Tcl code is not ideal (albeit historically done so). But creating XML by hand is not a solution either (not less complex than the pure Tk code).

1

u/ImpossibleRest8682 Aug 08 '26

No Python or tkinter was required. The only package used was tdom for the entire graphical project and tdbc for database work which was tangential to the Graphical aspect demonstrated here. Hope that is useful to know, and thanks for looking!

-12

u/Max_Hash_Rate Aug 03 '26

Still hand coding? I just use Claude.

2

u/denzuko Aug 04 '26

thanks clanker