[prev in list] [next in list] [prev in thread] [next in thread]
List: batik-dev
Subject: cvs commit: xml-batik/sources/org/apache/batik/script/rhino RhinoInterpreter.java
From: deweese () apache ! org
Date: 2003-07-10 13:49:59
[Download RAW message or body]
deweese 2003/07/10 06:49:59
Modified: sources/org/apache/batik/script/rhino RhinoInterpreter.java
Log:
RhinoInterpreter now binds the Global Object as 'window'
Revision Changes Path
1.31 +14 -15 xml-batik/sources/org/apache/batik/script/rhino/RhinoInterpreter.java
Index: RhinoInterpreter.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/script/rhino/RhinoInterpreter.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- RhinoInterpreter.java 10 Jul 2003 12:01:20 -0000 1.30
+++ RhinoInterpreter.java 10 Jul 2003 13:49:59 -0000 1.31
@@ -357,21 +357,20 @@
try {
if (name.equals(BIND_NAME_WINDOW) && object instanceof Window) {
window = (Window)object;
- } else {
- try {
- Scriptable jsObject;
- jsObject = Context.toObject(object, globalObject);
- objects.put(name, jsObject);
- if (ScriptableObject.getProperty(globalObject, name) ==
- ScriptableObject.NOT_FOUND)
- globalObject.defineProperty
- (name, new RhinoGetDelegate(name),
- rhinoGetter, null, ScriptableObject.READONLY);
- } catch (PropertyException pe) {
- pe.printStackTrace();
- }
+ object = globalObject;
+ }
+ try {
+ Scriptable jsObject;
+ jsObject = Context.toObject(object, globalObject);
+ objects.put(name, jsObject);
+ if (ScriptableObject.getProperty(globalObject, name) ==
+ ScriptableObject.NOT_FOUND)
+ globalObject.defineProperty
+ (name, new RhinoGetDelegate(name),
+ rhinoGetter, null, ScriptableObject.READONLY);
+ } catch (PropertyException pe) {
+ pe.printStackTrace();
}
-
} finally {
Context.exit();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic