From: SourceForge.net <no...@so...> - 2005-09-12 14:20:43
|
Bugs item #1288708, was opened at 2005-09-12 09:29 Message generated for change (Comment added) made by warp9pnt9 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105757&aid=1288708&group_id=5757 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: DynAPI 3 API Group: None Status: Open Resolution: None Priority: 5 Submitted By: Romain OLLIVIER (rhum1) Assigned to: Nobody/Anonymous (nobody) Summary: Cannot add function in Array prototype Initial Comment: Hi, I use a toolkit js library (gosu) with dynapi. When I load dynapi AND gosu's libraries, I got the following error : Error: n.indexOf is not a function Source File: http://localhost/dotproject/lib/dynapi/src/dynapi.js Line: 388 After a few tests, I found what was going wrong. Gosu add functions to Array prototype. If I remove this functions, everything's going fine. I use FF 1.0.6, but the same error occurs in IE6. If you want to reproduce that, just add the following function before including dynapi.js : Array.prototype.anOtherFunction = function(s) { alert(s); }; Could you tell me if you got the same problem ? Thanx ---------------------------------------------------------------------- >Comment By: L W (warp9pnt9) Date: 2005-09-12 10:20 Message: Logged In: YES user_id=706287 If the check the dynapi-help mailing list archives, you will see that Jesse Vitrone recently posted about a similar problem while using Prototype ( http://prototype.conio.net/ ). I suspect it's the same cause. DynAPI might be fiddling with the prototype in such a way as to affect the core JS objects like Array and String. This is not a good thing, but I don't really understand it too well. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105757&aid=1288708&group_id=5757 |