Nested @{} in a JS block

Is it possible, in a JS{{}} block, to do this:

var nb=1;
var my_pos=@{/nb/pos}

and where on the second line, ‘nb’ would be replaced with the content of the nb variable?

In a script I would have used get(), but what can I do in a JS{{}} block?

thx

@{} blocks are resolved to static variables before the execution of JS{{}} blocks, so that’s not possible.

Ok ;-(
Would it be possible to have get() available in JS blocks? that would be awesome

bumping this thread. Do you think you could allow using get(), send(), set() inside a JS{{}} block @jean-emmanuel ?

Hi, the answer is probably not, you should use a script widget if you need these functions. I’m still tinkering with the whole scripting system for v1 so this may change but it’s too early to say.