https://kotlinlang.org logo
#scripting
Title
# scripting
f

fitzoh

02/03/2017, 1:44 AM
Anyone have any luck with manually setting external variables vis JSR-223?
i

ilya.chernikov

02/03/2017, 1:48 PM
@fitzoh: The direct access is not implemented yet - see https://youtrack.jetbrains.com/issue/KT-15125. But all bindings are accessible via
bindings: Map<String, Any>
property, so you can write:
Copy code
val result = engine.eval(”””bindings[”thing”]”””)
instead.
👍 1
a

apatrida

02/03/2017, 4:07 PM
Cool, I didn’t realize that worked yet.