Greetings Lingo-Listers.

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.

i tried using...

--< parent script >-----------------------
property pInstanceList

on new me, wInstance
  -- pInstanceList = []  -- this is where i get in trouble.
  append(pInstanceList, wInstance)
  return me
end

on mDisplayInstanceList me
  put pInstanceList
end


--< behavior >-----------------------
property pObj

on beginSprite me
  pObj = new(script "_Parent_", me)
  -- add(the actorList, me)    -- i don't want to use this.
end

on mouseUp me
  pObj.mDisplayInstanceList(me)
end
--< /behavior >-----------------------


If i add the line pInstanceList=[] then
the list gets initialized everytime
an object is created. So, where is
the perfect place to initialize
the list?


Thanks a lot in advance.

John Erazo

[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