Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Dawn-Xu-helloworld opened this issue Feb 2, 2024 · 3 comments

Comments

@Dawn-Xu-helloworld
Copy link

#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
Copy link
Author

Dawn-Xu-helloworld commented Feb 2, 2024

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

@scandum
Copy link
Owner

scandum commented Feb 2, 2024

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.

@Dawn-Xu-helloworld
Copy link
Author

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants