Hi
in line :
addEventListener("click",this,false)
'this' will be handled by 'Strange.prototype.handleEvent'
but in line :
getURL("strange.svg",this);
'this' refers to 'Strange'
maybe you can use something like :
getURL("strange.svg",this.callback);
Strange.prototype.callback = function(response){
}
for addEventListener, in ASV 'this' will refer to the object, but in
CSV and Batik, 'this' refers to js 'Function' native object.
amri
--- In [email protected], Klaus Förster
<[EMAIL PROTECTED]> wrote:
> are there any know issues with using getURL in combination with
> prototypes, handleEvent and operationComplete in ASV3/6? the
following
> code yields a parameter type mismatch error for getURL
passing "this" as
> callback-function argument and i don't see a reason why it should ;-
)
>
> strange.svg:
> <svg>
> <script type="text/javascript"><![CDATA[
> function Strange() {
> document.getElementById("r").addEventListener
("click",this,false);
> }
> Strange.prototype.handleEvent = function(evt) {
> getURL("strange.svg",this);
> }
> Strange.prototype.operationComplete = function(req) {
> alert(req.success);
> }
> new Strange();
>
> ]]></script>
> <rect id="r" x="20" y="20" width="40" height="30" />
> </svg>
>
> any ideas how to solve this?
> klaus
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12h0ob84t/M=362335.6886445.7839731.1510227/D=groups/S=1706030389:TM/Y=YAHOO/EXP=1124870282/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/">In
low income neighborhoods, 84% do not own computers. At Network for Good, help
bridge the Digital Divide!</a>.</font>
--------------------------------------------------------------------~->
-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/