PiRSquared17 / wikiforce

Automatically exported from code.google.com/p/wikiforce
0 stars 0 forks source link

Use of for/in loops when using prototype.js causes errors #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In WikiPage.js you do the following:

var i;
function cargarimagenes(){

    for(i in imagenes){
        lista_imagenes[i] = new Image();
        lista_imagenes[i].src = imagenes[i];
    }

} 

However when including prototype.js, you should not iterate over arrays
this way. See:

http://www.prototypejs.org/api/array

When iterating with a for/in loop, this will then include functions that
prototype adds to all arrays. When you then try to set the src of an image
using this function, it results in errors on the force.com servers. 

You should: 
(1) fix this issue as soon as possible
(2) release a new version on the app exchange with the fix
(3) contact current users of the package and encourage them to upgrade to
the new release

...stephan

Original issue reported on code.google.com by smor...@gmail.com on 12 Oct 2009 at 6:59

GoogleCodeExporter commented 9 years ago
Thank you for your observation our dev team will be notified.

This will be included in our next release.

As an open source community, input from users such as yourself is invaluable 
and we
invite you to continue to do so.

Thanks,

The ProjectForce, WikiForce and DiscussionForce Team.

Original comment by mmena...@gmail.com on 15 Oct 2009 at 1:41