Skip to content
Discussion options

You must be logged in to vote

Interesting question. As you outline, there are two ways to achieve this at the moment:

  1. Provide your own class that extends JactlContext and then cast the JactlContext object to your new class every time you want access to this additional information.
  2. Hide your application context as a global variable in the Map of globals. If you use a name that is not a valid identifier as the key in the map (e.g. anything with '$' in it) then scripts won't be able to see it and it won't clash with any real global someone might want to use.

Do you want state that is per-invocation or shared across all script invocations that share the same JactlContext?
It would be trivial to add a method to JactlCont…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@spinscale
Comment options

Answer selected by spinscale
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants