I've been using Tcl/Tk for a while both as a scripting language, and embedded in C++. However, my experience using calling the Tcl/Tk library C functions has been largely a frustrating trial of trial and error. The man pages (e.g. http://www.tcl.tk/man/tcl8.4/TkLib/contents.htm) are all very well, if you know what function you're looking for, but I can't find anywhere where the developers of the libraries have written down how they recommend they be used. For example, the man page for Tk_GeometryRequest says: "Widget code should never call procedures like Tk_ResizeWindow directly. Instead, it should invoke Tk_GeometryRequest and leave the final geometry decisions to the geometry manager." Well, how is one to know that?! - unless you stumble on the Tk_GeometryRequest page, because after 45 minutes of trial and error, you can't seem to make Tk_ResizeWindow do what you expect? What I am looking for therefore is a programmer's guide to using the Tcl/Tk libraries in a C/C++ application. I don't mean the usual perfunctory "How to embed Tcl/Tk in C" chapter found in most Tcl/Tk books. I mean a guide describing the best/proper/suggested use of the multitude of C functions in the Tcl Tk libraries to create a polished and sophisticated user interface for a C or C++ program. I would be most grateful if someone can point me to a web or printed resource. Thanks Mike
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mike Eglington wrote: > >.... > > What I am looking for therefore is a programmer's guide to using the > Tcl/Tk libraries in a C/C++ application. I don't mean the usual > perfunctory "How to embed Tcl/Tk in C" chapter found in most Tcl/Tk > books. I mean a guide describing the best/proper/suggested use of the > multitude of C functions in the Tcl Tk libraries to create a polished > and sophisticated user interface for a C or C++ program. I would be > most grateful if someone can point me to a web or printed resource. > > Thanks > Mike Sounds like a good book preface to me. With the current void of new Tcl printed material, one of those might do well. I'd buy it.. I'd even contribute. Me and Andreas on the channel driver chapters.. Zoran on threading.. Miguel on the bytecode compiler.. Jeff as the executive editor.. What/how would the summary look like? Ohh.. The title: "Extreme Tcl: Prove to your co-workers why Java sux" The intent was light of heart.. So don't jump on me with flaming torches, please. Oh.. Back on topic.. The best examples for the deep API stuff happens to be the source itself. I'd suggest reading the Tk core and get a feel for how it uses itself. Not a complete answer to your Q, but as close as I can come to one. - -- David Gravereaux <davygrvy@pobox.com> [species:human; planet:earth,milkyway(western spiral arm),alpha sector] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (MingW32) iD8DBQFCE7wqlZadkQh/RmERAoBuAJ9a6CfchrKm97bbNMjepmi8NFIT8wCgwHg3 Y4Of8beI18D09RH08Q/nDyI= =nV8B -----END PGP SIGNATURE-----