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: border1.nntp.dca.giganews.com!nntp.giganews.com!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.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: Thu, 16 Jan 2014 12:30:11 +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="28804"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+9qTAcuWIbU45JtxFXOPmSUXtTjeQ4SuM=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:BzsmTVRbwBosHy9aaufyynG93t4= sha1:TT1syy81lXbvMcSTdt2RzUeCSPY= Xref: number.nntp.dca.giganews.com comp.lang.ada:184448 Date: 2014-01-16T12:30:11+00:00 List-Id: 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. [1] https://www.dropbox.com/s/nn8qkcbp3z30zcj/watching.tar.gz