From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: GUI for Ada (GPS with GtkAda or GtkGlade GUI Builder) Date: Tue, 18 Aug 2015 23:05:28 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="701e1a91696e79a9574ebe874fee72d6"; logging-data="11251"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/EAdaZzBZnoQ9/38AMtiPSYuag9eL5f4E=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:7Bjde+S56HJdxD5IUMbqIeL46Bo= sha1:+Vd4bb6pkAMxWf29fPNrC5UNWjc= Xref: news.eternal-september.org comp.lang.ada:27497 Date: 2015-08-18T23:05:28+01:00 List-Id: Norman Worth writes: > Somebody mentioned using Tcl/Tk for the GUI. A decent binding does > exist. I was at the conference where it was introduced several years > ago. The results are nice, and Tk is a nice interface to work with, > but the code for the Ada/Tk combination is pretty ugly. See https://sourceforge.net/projects/tcladashell/. Personally I'd write the HCI in Tcl/Tk and run it from an interpreter which has been extended to support the application. Writing Ada code that supports Tcl commands to provide input to the application is straightforward, as it is for commands to get output from the application. For a long time I put up with polling the application to detect changes, but in January 2014 I wrote Tcl.Async: Tcl.Async supports writing Tcl variables from Ada. This is especially important if the Ada code isn't running in the same thread as the Tcl interpreter. You can use the 'trace' facility in Tcl to detect when such a write has taken place.