Code that I developed in November 2010 has been working until today when I deleted and re-created a relation named 'animal_to_synonym' that it uses. Now, when the code executes, it generates the following error message:
ReferenceError: "animal_to_synonym" is not defined.
Here is the line of code that generates the error:
- Code: Select all
var recordSynonym = animal_to_synonym.getRecord( animal_to_synonym.newRecord( false ) )
The relation is clearly visible in:
Solution Explorer --> Modules --> ARM_animal --> Relations
and, when I open the relation, all the settings look good.
Here is an excerpt from the server log:
2011-06-22 16:06:07,930 ERROR [AWT-EventQueue-0] com.servoy.j2db.util.Debug - Throwable
org.mozilla.javascript.EcmaError: ReferenceError: "animal_to_synonym" is not defined. (C:\Users\kim\servoy51_workspace\ARM_animal\globals.js#228)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3663)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3657)
at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3719)
at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1754)
at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1679)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3752)
at script.createAnimalRecord(C:\Users\kim\servoy51_workspace\ARM_animal\globals.js:228)
I have also stopped and re-started Developer several times to clear any potential problems.
Why does Servoy think the relation is not defined? Any help is very much appreciated!