I think I am following you. One instance I noticed you didn't try was:

pAddressBook[symbol(aGroup)].addProp(aSpriteRef, [1])

HTH,

-- Clint

Clint Little
Multimedia Developer
JuniorNet Corporation
(617) 619-5571
check us on the web: www.juniornet.com


-----Original Message-----
From: Jon Rowe [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 27, 2000 8:47 AM
To: '[EMAIL PROTECTED]'
Subject: <lingo-l> OOPS - handler not found in object


Hi all

a little conundrum here, I'm working on a very low-spec machine but have
lots of animation bits that I want to play. So instead of having them
all play at the same time I'm sequencing them according to various
states that the application encounters. To do this I have set up an
<animation manager> object which i use to turn animations on and off.
This <animation manager> has a propertyList <pAddressBook> which holds
references to all the sprites and calls accessor methods in the sprites
behaviours to control when they play etc.

Now I thought it would be a good idea if the animations were grouped so
I can turn, say, all the <icons> group on or off at one time etc. So now
when the sprites initialise themselves they pass a <group> identifier to
the <animation manager> along with their sprite reference. The
<animation manager> then adds them to its property list thus, where
aGroup = #icons:

on regAddress me, aSpriteRef, aGroup
  
  if voidP(getAProp(pAddressBook, aGroup)) then
    --    put "no group exists"
    addProp pAddressBook, aGroup, [:]
  end if
    -- more code to be added here to fill the group
end     

This gives pAddressBook = [#icons:[:]]

so now having set up the group I want to add the sprite refs of all
sprites within that group to the sublist #icons. So I've tried using...

addProp pAddressBook.aGroup, aSpriteRef, [1]

and...

addProp pAddressBook.value(aGroup), aSpriteRef, [1]

and...

(pAddressBook.aGroup).addProp(aSpriteRef, [1])

but director complains about all these. So my question is how do I
access my #icons sublist with a variable that evaluates to #icons? My
only thought is to use integers rather than symbols for my group names
but that doesn't seem very elegant to me although it would undoubtedly
work. Any ideas?

Hope this makes sense to someone.cheers 

Jon Rowe 


[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!]

[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