Hi Philip,

    I tried your example in the current SVG11 branch, the trunk (before 
Cameron's SMIL stuff
was added) and the Batik 1.6 release.

   I used the 'squiggle' viewing component from Batik, everything seemed 
to work just fine.
All of: mousedown, mouseup, mousemove, and click appeared in the label. 
Likewise I
got the correct modifier keys.

"Fennell, Philip" <[EMAIL PROTECTED]> wrote on 07/31/2006 05:52:24 AM:

> Further to my previous e-mails reguarding script problems with Batik 1.6
> and Rhino 1.6 I have a test case which exhibits two of my main problems.
> 
> 1) The embedded scripts attempt to attach multiple event listeners to
> the same DOM node but only the first listener gets registered. In
> addition the starck trace (listed below) is generated.
> 
> 2) Also the MouseEvent modifier key attributes {shift, ctrl and alt] are
> not working correctly (see end of this e-mail).
> 
> 
> I have attached the example SVG file (example.svg)
> 
> 
> Regards
> 
> 
> Philip Fennell
> 
> 
> 
>      [java] java.lang.NoSuchFieldError: instance
>      [java]     at
> org.apache.batik.script.rhino.EventTargetWrapper$FunctionAddProxy.call(U
> nknown Source)
>      [java]     at
> org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:84)
>      [java]     at org.mozilla.javascript.gen.c4._c1(Inline <svg:script>
> null:-1:7)
>      [java]     at org.mozilla.javascript.gen.c4.call(Inline
> <svg:script> null:-1)
>      [java]     at
> org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:95)
>      [java]     at org.mozilla.javascript.gen.c5._c1(Inline <svg:script>
> null:-1:10)
>      [java]     at org.mozilla.javascript.gen.c5.call(Inline
> <svg:script> null:-1)
>      [java]     at
> org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:95)
>      [java]     at org.mozilla.javascript.gen.c6._c0(Event attribute
> null:-1 onload:1)
>      [java]     at org.mozilla.javascript.gen.c6.call(Event attribute
> null:-1 onload)
>      [java]     at
> org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:337)
>      [java]     at
> org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2755)
>      [java]     at org.mozilla.javascript.gen.c6.call(Event attribute
> null:-1 onload)
>      [java]     at org.mozilla.javascript.gen.c6.exec(Event attribute
> null:-1 onload)
>      [java]     at
> org.mozilla.javascript.Context.evaluateReader(Context.java:1163)
>      [java]     at
> org.apache.batik.script.rhino.RhinoInterpreter.evaluate(Unknown Source)
>      [java]     at
> org.apache.batik.bridge.BaseScriptingEnvironment$1.handleEvent(Unknown
> Source)
>      [java]     at
> org.apache.batik.dom.events.EventSupport.fireEventListeners(Unknown
> Source)
>      [java]     at
> org.apache.batik.dom.events.EventSupport.fireEventListeners(Unknown
> Source)
>      [java]     at
> org.apache.batik.dom.events.EventSupport.dispatchEvent(Unknown Source)
>      [java]     at
> org.apache.batik.dom.AbstractNode.dispatchEvent(Unknown Source)
>      [java]     at
> org.apache.batik.bridge.BaseScriptingEnvironment.dispatchSVGLoad(Unknown
> Source)
>      [java]     at
> org.apache.batik.bridge.BaseScriptingEnvironment.dispatchSVGLoadEvent(Un
> known Source)
>      [java]     at
> org.apache.batik.bridge.UpdateManager.dispatchSVGLoadEvent(Unknown
> Source)
>      [java]     at
> org.apache.batik.bridge.UpdateManager.dispatchSVGLoadEvent(Unknown
> Source)
>      [java]     at
> org.apache.batik.swing.svg.SVGLoadEventDispatcher.run(Unknown Source)
> 
> 
> 
> 
> -----Original Message-----
> From: Fennell, Philip 
> Sent: 28 July 2006 11:48
> To: [email protected]
> Subject: JavaScript and MouseEvent modifier keys problem
> 
> Hello,
> 
> When listening to DOM MouseEvent events the modifier keys attributes
> (shiftKey, ctrlKey and altKey) should indicate 'true' when those keys
> are pressed when a mouse event (click, move, etc...) occurs.
> 
> It turns out that, for listeners attached to the SVGDOM using
> JavaScript, the following behaviour is exhibited when a mouse event
> occurs:
> 
> 1) None of the modifier key attributes indicate 'true' when they are
> individually pressed.
> 2) If [Ctrl] + [Shift] are pressed together the shiftKey == true.
> 3) If  [Alt] + [Shift] are pressed together the shiftKey == true.
> 4) If  [Alt] + [Ctrl]  are pressed together the  ctrlKey == true.
> 
> This is not the correct behaviour.
> 
> I have run the same example in ASV3, Opera 9 and FireFox 1.5.5 and they
> all behave correctly.
> 
> As this is a DOM Events problem I will combine it with the multiple
> event listener problem I reported last week and create a test example
> that covers both.
> 
> 
> 
> 
> Regards
> 
> Philip Fennell 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> [attachment "example.svg" deleted by Thomas E. DeWeese/449433/EKC] 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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

Reply via email to