One of the side-effects(indeed the only negative one I am aware of) of using prototype is the problem you have described. The only way to pass an array as you have described, would be to hash the array, or pass it as json, or something. However, I think you would be better off modifying your loop. With prototype you can't really use the for- in looping construct. You need to either loop through the array numerically or use prototype's Enumerable.each.
Good Luck, Shelby On Jan 5, 5:02 am, Jake <[email protected]> wrote: > On Jan 5, 7:35 am, Jake <[email protected]> wrote: > > > I am using prototype 1.6.0.3. All I am trying to do is get the > > results from evalJSON and iterate through them. I have an Ajax > > request, and on success it does something like: > > > thisObj.adjustResultsForMovement.bind(thisObj, > > transport.responseText.evalJSON(true))(); > > I have learned the problem is not with iterationg, but if I do > something like this: > > var markers = transport.responseText.evalJSON(true) > thisObj.adjustResultsForMovement.bind(thisObj, markers)(); > > If markers is an empty array [], then whenadjustResultsForMovement is > called, prototype changes the markers array and adds all of the > prototype functions. It doesn't do this when markers has elements. > > Is there a way I can stop it from adding all of these functions? If I > want to pass an empty array using bind, is there no way I can do that? > > Thanks.
-- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
