tintin icon indicating copy to clipboard operation
tintin copied to clipboard

You can't trig a action "out of range" that created by a locally variable

Open Dawn-Xu-helloworld opened this issue 1 year ago • 3 comments

#alias set { #local {condition} {test local}; #action {$condition} {#show trigged!}; } #alias test { #show test local; }

when you "set" up and "test", nothing happened, and the action turn back into #action {$condition} {#show trigged!}

In my point, I think the action's trigging text should be stable and unchangeable.

Dawn-Xu-helloworld avatar Feb 02 '24 17:02 Dawn-Xu-helloworld

I think in some conditions, we would need a temporary but unfixed oneshot action, It's necessary to use a local variable, or a disposable variable to make the namespace clean and tidy, but the action should keep in work

Dawn-Xu-helloworld avatar Feb 02 '24 17:02 Dawn-Xu-helloworld

You can use:

#line substitute variables #action {$condition} {#show trigged!};

Keep in mind if you have any variables in the action body, you may want to use $$var to prevent substitution.

scandum avatar Feb 02 '24 19:02 scandum

You can use:

#line substitute variables #action {$condition} {#show trigged!};

Keep in mind if you have any variables in the action body, you may want to use $$var to prevent substitution.

Can I use this inside a #line oneshot ?

Dawn-Xu-helloworld avatar Feb 03 '24 02:02 Dawn-Xu-helloworld