Hi Shekhar,

Again, please don't post the same message several times...


> thnx for ur instant replies..

"thnx"? "ur"? No understand [1] ... ;-)


> I am using Batik 1.7 beta version right now ..
> We have overrided RhinoInterpreter class and following is line of code I am
> using :
> parent = new LiveConnectBrowserObject("body", JSObject.getWindow(applet));
>         }
>         bindObject("parent", parent);
> where LiveConnectBrowser is in parent heiarchy

Please don't post things already asked for: The same thing was already
asked in a thread by yourself [2].

For what it's worth, I tried updating my variable binding code, using
the trunk code and I also wasn't yet able to make it work as expected
(accessing the browser's object model using "parent" and/or "top").
But I haven't tried hard and been having little cycles to dedicate to
this, so I might return to this in the future. In the meantime, here
goes a code snippet (feedback welcome!):

  protected JSVGCanvas canvas;
  final JSObject jswindow = JSObject.getWindow(this);

  canvas.addSVGLoadEventDispatcherListener(new SVGLoadEventDispatcherAdapter() {
  public void svgLoadEventDispatchStarted(SVGLoadEventDispatcherEvent e) {
    Interpreter i = canvas.getInterpreter("text/ecmascript");

    // bind applet window environment to window.parent and top window
(use JS eval to find it) to window.top
    // 
http://xmlgraphics.apache.org/batik/javadoc/org/apache/batik/script/Interpreter.html
    // NOTE: we actually bind parent.window, since it's actually the
global object we are interested in
    JSObject jsparent = (JSObject) jswindow.getMember("parent");
    Object jsParentWindow = (Object) jsparent.getMember("window");

    // currently not working...
    i.bindObject("parent", jsParentWindow);
    // not working either
    i.bindObject("top", jswindow.eval("window.top"));
  }


Hope this helps,
 Helder


[1] http://www.catb.org/~esr/faqs/smart-questions.html#writewell
[2] 
http://www.nabble.com/Issue-regarding-binding-of-javascript-object-(eg.parent)-td23638884.html

<<attachment: windowParentTop.svg>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to