• Post Reply Bookmark Topic Watch Topic
  • New Topic

error to get variable in scripting with rhino  RSS feed

 
Viktor Stolbin
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody
I'm embedding rhino in my desktop application and faced with problem. In script I use hibernate Restrinctions.eq() and it gets an error when trying to call static "eq()". I wrote a test class and a test script:
Test class

Test script


It gets error:
org.mozilla.javascript.EcmaError: ReferenceError: "ru" is not defined. (<cmd>#1)


Class TestClass is in the same package my script util is. When I changed script to:


it gets the same error I get with hibernate Restriqtions.eq():

org.mozilla.javascript.EcmaError: TypeError: Cannot call property test in object [JavaPackage ru.griffo.core.ui.utils.TestClass]. It is not a function, it is "object". (<cmd>#1)


I tried to use Importers and get this error again.

Script util class


Please, help me to solve this problem
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!