>How do you create a linear list of instances
>of objects created from one parent script without
>making that list global? other than the actorList.

For once, I read the whole thread before answering.

Grimm is on the right track, but his solution won't work as it is because 
each instance creates its own properties. When you add to the list, you're 
adding to that instance's list, not a shared list.

I use a global object manager for this sort of thing. I would use it to 
actually create the object and put it in a list, but you could also just 
add it to the list.

Untested e-mail Lingo:

property pObjectList

on new me
   pObjectList = [:]
   yada yada
end

on addToList scriptName instanceRef
   if pObjectList.getPos(scriptName) = 0 then
     pObjectList.add(scriptName: [instanceRef])
   else
     pObjectList.scriptName.add(instanceRef)
   end if
end

You'll need an accessor method and a delete method, but those shouldn't be 
too hard if you follow the model above.

Cordially,

Kerry Thompson


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to