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

mkobit

03/29/2021, 6:13 PM
It doesn't look like
@ScriptBody
is implemented yet. It there a different way to return a value from a script to the scripting host?
r

raniejade

04/01/2021, 2:58 AM
Not sure if it is implemented but the generated class will have a
resultField
based on the KEEP https://github.com/Kotlin/KEEP/blob/master/proposals/scripting-support.md#script-class.
👍 1
Personally, I prefer to ScriptBody approach since it gives me flexibility when to "invoke" the script - outside of instantiation.
5 Views