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.8 required=5.0 tests=BAYES_00,URI_HEX autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: thick Tcl binding, am I being logical ? Date: Sun, 19 Jan 2014 17:56:53 +0000 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx05.eternal-september.org; posting-host="d6dcbed888a91bae80923cc55b286b77"; logging-data="15850"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+xsM8PFp57U0U92JrMT9vHTPC5/HYMACI=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:O1ycwKCQaDHq3exfaxwkzTcSj9Y= sha1:v6+kD8ov2Tiuv97BtOiIVdZDfz4= Xref: news.eternal-september.org comp.lang.ada:18226 Date: 2014-01-19T17:56:53+00:00 List-Id: Simon Wright writes: > Simon Wright writes: > >> The only problem I've come across with this style is how to manage >> changes in the model that need to be reflected in the view; polling >> certainly works but seems less than ideal. Maybe Tcl_Eval and variable >> tracing would do the trick. > > Variable tracing works fine, with Tcl_SetVar(). I've added a demo to > Tash at r162, see also at Dropbox[1]. > > Note, this demo is syntactically correct, but I'm concerned that it's > synchronous, whereas the only sensible use case is asynchronous (the Ada > model generates a new value in response to an input of which Tcl is > unaware). More thought needed. Yes, it was much more complicated than I'd thought. > [1] https://www.dropbox.com/s/nn8qkcbp3z30zcj/watching.tar.gz I've deleted this, in favour of tash-8.6-1-20140118.zip at Sourceforge.