Zamy846692
Zamy846692
Done it, check Pull requests now.
How do you call Tcl from JS though? EDIT: ``` package require duktape package require duktape::oo set interp [::duktape::oo::Duktape new] $interp tcl-function sayHello {name} { return "Hello, $name!" } set...
Could that approach be used to create a JS object literal, and then set back to `safe` mode?
My experimental global stateless object: ``` package require duktape package require duktape::oo set interp [::duktape::oo::Duktape new] # Tcl: Define the singleton "object" using a namespace namespace eval Global { variable...
Is there a way to register a Tcl function specifically to one JS object, so that it must be used as a method of the object?
How to you return a Tcl variable as a JS object property? (return it in JS) So-far: ``` package require duktape::oo set interp [::duktape::oo::Duktape new] set prop "" ;# Set...
Is there any way of adding variables into the body of `tcl-function` definitions, from outside, during declaration, **without** having to pass them as arguments in JS? it would be **very**...
> How to you return a Tcl variable as a JS object property? (return it in JS)
> Not directly. You can do something like this: > > package require duktape > set duk [::duktape::init] > > ::duktape::tcl-function $duk foo {} { > lindex hi > }...
``` package require duktape::oo set interp [::duktape::oo::Duktape new] $interp tcl-function doSomething arg {return "window did: $arg"} namespace eval ::Window { variable prop 5 ;# Set initial property value } $interp...