Michael, (and others submitting patches)

I don't know if you followed the discussions on how to submit bugs/patches a
while back?
Basically things like this should be submitted as a patch, so they don't get
lost, it saves you reposting stuff, and keeps comments on the patch in
sequence.

The Submission guide is here:
http://dynapi.sourceforge.net/dynapi/content.php?menu=14&page_id=13

Patches are here:
http://sourceforge.net/tracker/?atid=305757&group_id=5757&func=browse

Submitted patches are automatically posted to this list as well.

Cheers,
Richard Bennett

[EMAIL PROTECTED]
www.richardinfo.com
(Everything running on, and ported to the 19/12/2000 snapshot of DynAPI2)
visit the DynAPI homepage (and FAQ) ::
http://dynapi.sourceforge.net/dynapi/index.php?menu=1
Browse (and search) the mailinglist here:
http://www.mail-archive.com/index.php3?hunt=dynapi

----- Original Message -----
From: "Michael Bürge" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 23, 2001 12:43 AM
Subject: [Dynapi-Dev] DynAPI X: addEventListener


> there's a bug in the following method (in listeners.js):
>
> the corrected version is:
>
> DynObject.prototype.addEventListener=function(listener) {
>     if(!this.eventListeners) {
>         this.eventListeners = [];
>     }
>     // the following line has been moved
>     // it was inside the if-statement
>     this.hasEventListeners = true;
>     for (var i in this.eventListeners) if
(this.eventListeners[i]==listener)
> return;
>     this.eventListeners[this.eventListeners.length]=listener;
> }
>
>
> the line:
>    this.hasEventListeners = true;
> has to be moved outside the if-statement.
>
> otherwise the following happens: if you add some listeners and then remove
> them all, this.hasEventListeners is set to false, but if you decide to
again
> add a listener, hasEventListeners would remain false, because
eventListeners
> is defined and the if-statement is not executed.
>
> --
> Michael Buerge
>
>
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-dev
>


_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-dev

Reply via email to