Closed plippe closed 5 years ago
Hi Philippe, thank you for your question.
.eval just returns whatever you would receive when using vanilla Rhino. So anything that works for Rhino, should work here as well.
One option might be if you already convert the result into a string in your JS code?
It is more on the Java/Scala side of things. Object, and asInstanceOf, isn't really "safe" code.
I was unable to find anything in the javadoc, and was wondering if I missed anything.
The code above works, but require Context to be entered, and exited. You might of had something magic I could have used.
Anyways, great work on the lib, works wonders.
On Wed, 24 Apr 2019, 23:15 Max Rohde, notifications@github.com wrote:
Hi Philippe, thank you for your question.
.eval just returns whatever you would receive when using vanilla Rhino. So anything that works for Rhino, should work here as well.
One option might be if you already convert the result into a string in your JS code?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/javadelight/delight-rhino-sandbox/issues/7#issuecomment-486448263, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKRKO7PP7TXJK2DWFTEL3TPSDLYLANCNFSM4HIFNCIQ .
Thank you, glad that it is helpful!
Hi,
Just started playing with your library, and I am wondering if there is a better way to cast the output from
.eval
to aString
.My current code is the follow:
Thanks for your help