/*
Basically I'm trying the pass an array of objects and pass them into
the Test class, but it only seems to be passing in the last object in
the array...
*/
// class to store the id, first, last name
Test = Class.create({
options:{},
initialize:function(count,obj){
Hi,
Your problem is in your Test class. You're creating an `options`
object on the prototype of your class, which means that it will be
*shared* by all instances of your class. Since your constructor is
writing to properties on that shared object, naturally multiple calls
to the constructor
You'r creating a new Test obj for each item in the array. I'm guessing
that you instead, want to push the results into a singelton Test class
holding an array of options for each obj?
Idriz
On Sun, Oct 10, 2010 at 5:25 AM, Steven Albarracin
stevenalbarra...@gmail.com wrote:
/*
Basically I'm
Thanks for your suggestions and recommendations...
On Oct 10, 6:08 am, T.J. Crowder t...@crowdersoftware.com wrote:
Hi,
Your problem is in your Test class. You're creating an `options`
object on the prototype of your class, which means that it will be
*shared* by all instances of your class.