[svg-developers] EventListener problem with mapApp from Carto.net

2006-09-29 Thread richard_smith_ons
Running under IE6 / ASV 3.0.3 I sometimes get the error object 
doesn't support this property or method line 69 column 2. The line is 
in MapApp.js and is document.documentElement.addEventListener
(SVGScroll,this,false);

The problem started occuring when I upgraded the code from 0.99 to 
1.1. It only happens occasionally, and when it does it goes away on 
refresh. Anyone got any ideas on this problem?

Thanks,

Richard






-
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/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* 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/
 




[svg-developers] eventListener is a hoax

2005-05-20 Thread Francis Hemsher

Hey folks,

If you understood xml you would see that
setAttribute(onclick myFunction())
is how you accomplish events. Gad! I've been seeing this eventListener 
thingie for years and it's about time it was removed from SVG!!!

Francis






-
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/
 




[svg-developers] eventListener crashing IE ????

2005-05-19 Thread skrellkolja
I've been working with SVG for a while now and have encountered a very 
irritating bug. At least that what I think it is.
Suddenly IE starts terminating on refresh or when trying to enter 
another http-address. I have tried to understand when the problem 
occurs and it seems to be after adding an eventListener.

Does anyone know of any known bugs connected to the eventListener??

thx




-
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/
 




Re: [svg-developers] eventListener crashing IE ????

2005-05-19 Thread Jorg Heymans
We've had some difficulties with this as well yes. The probleem seemed
to go away when you deregister the eventlisteners onunload().

HTH
Jorg

skrellkolja wrote:
 I've been working with SVG for a while now and have encountered a very 
 irritating bug. At least that what I think it is.
 Suddenly IE starts terminating on refresh or when trying to enter 
 another http-address. I have tried to understand when the problem 
 occurs and it seems to be after adding an eventListener.
 
 Does anyone know of any known bugs connected to the eventListener??
 
 thx
 
 
 
 
 -
 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 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/
 




Re: [svg-developers] eventListener crashing IE ????

2005-05-19 Thread Renato Salas
Hi:

I had the same problem. My IE crashed when I remove an element that has 
an event associated with it.

(*)For instance, having:

var labelRectElement = document.createElementNS(svgNS,rect);
labelRectElement.addEventListener(mouseover,this,false);

//adding the labelRectElement to another node
var labelGroupElement = svgdoc.getElementById(labelGroup);
labelGroupElement.appendChild(labelRectElement);

(*)...when I try to do this (remove labelGroupElement):

labelGroupElement.parentNode.removeChild(labelGroupElement);

(*)..everything still working but when I reload the page or try to 
change the URL to go to another site from the same window
my IE crashes. I guess internally some objects are still pointing to the 
registered elements.

So I implemented a method that actually unregister any event from all 
the childs nodes tree structure. It doesn't matter if an element
don't have an event associated, so it's safe to remove all anyway.

function removeChildElements(theParent, evtHandler) {
while((c = theParent.firstChild) != null) {
if (c.hasChildNodes()) {
removeChildElements(c, evtHandler); //recursive
} else {
if (c.nodeType == 1) {
c.removeEventListener(mousedown,evtHandler,false);
c.removeEventListener(mouseup,evtHandler,false);
c.removeEventListener(mouseover,evtHandler,false);
c.removeEventListener(mouseout,evtHandler,false);
c.removeEventListener(mousemove,evtHandler,false);
c.removeEventListener(click,evtHandler,false);
c.removeEventListener(keypress,evtHandler,false);
c.removeEventListener(SVGResize,evtHandler,false);
}
theParent.removeChild(c);
}
}
}

(*) So now I remove an element like this:

removeChildElements(labelGroupElement, this);
labelGroupElement.parentNode.removeChild(labelGroupElement);

(*)...and the IE don't crash anymore.



Hope that helps,

Renato F. Salas



Jorg Heymans wrote:

We've had some difficulties with this as well yes. The probleem seemed
to go away when you deregister the eventlisteners onunload().

HTH
Jorg

skrellkolja wrote:
  

I've been working with SVG for a while now and have encountered a very 
irritating bug. At least that what I think it is.
Suddenly IE starts terminating on refresh or when trying to enter 
another http-address. I have tried to understand when the problem 
occurs and it seems to be after adding an eventListener.

Does anyone know of any known bugs connected to the eventListener??

thx




-
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 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 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/
 




Re: [svg-developers] eventlistener

2004-11-04 Thread Antoine Quint

Hi Olaf,

On 4 nov. 04, at 11:39, Olaf Schnabel wrote:

 I have a simple question: is it possible to check the existence of an
 eventlistener?

 I added a listener with ECMAScript:
 document.documentElement.addEventListener(keypress,this,false);

 But now I want to remove the eventlistener, if it already exists (this
 code of course doesn't work):
 if (document.documentElement.eventListener == keypress)
 {document.documentElement.removeEventListener(keypress,this,false);}

 Any ideas?

What you can do is write your own method to add event listeners and 
keep track of objects and what event listeners they have.

For what it's worth, you can always call removeEventListener even if 
there are no event listeners. According to the DOM Level 2 specs, there 
are no exceptions or errors thrown in the case where you're trying to 
remove an event listener that isn't there.

Antoine
-- 
Antoine Quint [EMAIL PROTECTED]
W3C Invited Expert (SVG and CDF)
SVG Consulting and Outsourcing
http://svg.org/user/graouts/diary



[Non-text portions of this message have been removed]



 Yahoo! Groups Sponsor ~-- 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/1U_rlB/TM
~- 

-
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/
 





Re: [svg-developers] eventlistener

2004-11-04 Thread andré m. winter

hi olaf,

you could check the event attribute's value and decide on that what to 
do next. if the eventhandler (eg. click) is not definded the according 
attribute (eg. onclick) should be empty. or am i missing something here?

btw i stopped playing around with eventlisteners and use only the 
according attributes. it's not cleaner but sometimes safer (on asv3).

andré

-- 
___
andre m. winter,
http://www.carto.net/
http://www.vectoreal.com/
http://tirolatlas.uibk.ac.at/



Olaf Schnabel wrote:
 Thanks Antoine.
 It's no solution for me to generally remove it.
 In some cases I need the event listener, in some cases I can remove it. 
 That's why I wanted to implement an if-else-statement.
 It's a pity. Then I have to program my own methods :-(
 
 Olaf
 
 Antoine Quint wrote:
 
 
I have a simple question: is it possible to check the existence of an
eventlistener?

I added a listener with ECMAScript:
document.documentElement.addEventListener(keypress,this,false);

But now I want to remove the eventlistener, if it already exists (this
code of course doesn't work):
if (document.documentElement.eventListener == keypress)
{document.documentElement.removeEventListener(keypress,this,false);}


What you can do is write your own method to add event listeners and 
keep track of objects and what event listeners they have.

For what it's worth, you can always call removeEventListener even if 
there are no event listeners. According to the DOM Level 2 specs, there 
are no exceptions or errors thrown in the case where you're trying to 
remove an event listener that isn't there.

Antoine
 
 



 Yahoo! Groups Sponsor ~-- 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/1U_rlB/TM
~- 

-
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/