Hi.

K. W. Landry:
> Ok, I've got the Rhino jscript debugger running but it does not show any
> debugging info of the Batik canvas' svg jscript.
> 
> I'm guessing it's because the Rhino interpreter "Context" of Batik is not in
> any way associated with the Rhino Debugger  that I've instantiated.
> 
> I've gone back to using exactly the code that JSVGViewer is using to start
> the jscript debugger. At first, that actually failed with a class cast
> problem in addcontextlistener, I replaced debuggerFrame with Main and that
> fixed that.
> 
> I've also since moved the Context Listener up into the first "try" block,
> but other than that it's still the same stuff.
> 
> Anyone have any tips, thoughts, guidelines on getting the Rhino Interpreter
> Context associated with the Debugger? Or, what generally has to be done to
> get the Debugger to see the Context of the interpreter as its invoked by
> Batik so that it can debug jscript in the svg of the canvas?

Yes you need to do:

  RhinoInterpreter interp = …;
  Main debugger = …;

  ContextFactory cf = interp.getContextFactory();
  debugger.attachTo(cf);

See how JSVGViewerFrame.Debugger.attach uses the subclassed JSVGCanvas
object (JSVGViewerFrame.Canvas) to get access to the RhinoIntepreter
object.

-- 
Cameron McCormack, http://mcc.id.au/
        xmpp:[EMAIL PROTECTED]  ▪  ICQ 26955922  ▪  MSN [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to