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

Configure bindings in script properties #297

Open
marceltaeumel opened this issue Apr 17, 2019 · 0 comments
Open

Configure bindings in script properties #297

marceltaeumel opened this issue Apr 17, 2019 · 0 comments

Comments

@marceltaeumel
Copy link
Contributor

The user might want to keep state across script (or block) executions. Script properties might be a good place to configure such (persistent) bindings:

{
   [:num |
      counter := (counter ifNil: [0]) + 1.
      num * num] -> { #bindings -> #(counter) }
} asScript.

Maybe also store the initialization value in those configurations:

{
   [:num |
      counter := counter + 1.
      num * num] -> { #bindings -> { #counter -> 0 } }
} asScript.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant