Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/event In directory usw-pr-cvs1:/tmp/cvs-serv17458/src/lib/dynapi/event Modified Files: simple.js Log Message: Simple events can now be used with eventlisteners (as long as simple.js is included after listeners.js) Index: simple.js =================================================================== RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/event/simple.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** simple.js 2001/03/25 06:04:17 1.1 --- simple.js 2001/08/07 19:58:13 1.2 *************** *** 4,10 **** The DynAPI Distribution is distributed under the terms of the GNU LGPL license. */ DynObject.prototype.invokeEvent = function(type,e,args) { var ret = true; if(this["on"+type]) ret = this["on"+type](e,args) ! if(ret && this.parent) this.parent.invokeEvent(type,e,args); } --- 4,15 ---- The DynAPI Distribution is distributed under the terms of the GNU LGPL license. */ + if (typeof(DynObject.prototype.invokeEvent)=="function") { + DynObject.prototype._oldInvokeEvent = DynObject.prototype.invokeEvent; + } else { + DynObject.prototype._oldInvokeEvent = function() {return true;}; + } DynObject.prototype.invokeEvent = function(type,e,args) { var ret = true; if(this["on"+type]) ret = this["on"+type](e,args) ! if(ret && this._oldInvokeEvent(type,e,args) && this.parent) this.parent.invokeEvent(type,e,args); } _______________________________________________ Dynapi-CVS mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/dynapi-cvs