Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Use closures rather than strings for after and [every] |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | ferrieux-nacl |
Files: | files | file ages | folders |
SHA1: |
06e1f26911b1b323140d2b83c278a56f |
User & Date: | ferrieux 2011-04-18 21:22:31 |
Context
2011-04-18
| ||
21:53 | More concise serialization of coord-updates check-in: 7755a6cc4c user: ferrieux tags: ferrieux-nacl | |
21:22 | Use closures rather than strings for after and [every] check-in: 06e1f26911 user: ferrieux tags: ferrieux-nacl | |
2011-04-16
| ||
16:01 | Added 'natcl2tk' wrapper to run the same demo in true Tk, for speed comparisons. check-in: 8e4b3d24c5 user: ferrieux tags: ferrieux-nacl | |
Changes
Changes to nacl/init.natcl.
︙ | ︙ | |||
33 34 35 36 37 38 39 | append ::JS $j set x [yield] uplevel 1 $x } # Async [after] using JS's setTimeout() proc after {ms script} { | < | < | < | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | append ::JS $j set x [yield] uplevel 1 $x } # Async [after] using JS's setTimeout() proc after {ms script} { append ::JS "setTimeout(function(){tclDo([jsquote $script]);},$ms);\n" } # Async [every] using JS's setInterval() proc every {ms script} { append ::JS "setInterval(function(){tclDo([jsquote $script]);},$ms);\n" } # Delayed DOM-setting through the tclDo() trampoline proc domset {element inner} { append ::JS "$element.innerHTML=[jsquote $inner];\n" } |