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

Closure thisScript, thisPane and thisView in models #295

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

Closure thisScript, thisPane and thisView in models #295

marceltaeumel opened this issue Apr 15, 2019 · 0 comments

Comments

@marceltaeumel
Copy link
Contributor

We use global bindings to provide access to the current script step, the pane, and the view:

{ 
   [:object | { #text -> 'Save'. #clicked -> [[ thisView saveAndClose ]] } ]
      -> { #view -> ButtonBar }. 
} asScript.

However, the user has to create a local binding when the exeuction time is deferred such as in this button-bar example:

{ 
   [:object | 
      | v |
      v := thisView.
      { #text -> 'Save'. #clicked -> [[ v saveAndClose ]] } ]
      -> { #view -> ButtonBar }. 
} asScript.

Maybe we can replace or shadow those global (dynamic) bindings during script interpretation.

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