> However, this would seem to be a rash and dangerous balance on the edge
> of broken encapsulation. 'Cuz, I need to know the property name. It just
> seems to me that if I know the handler name, then I'm not ridiculously
> far from knowing the property name.

Consider this

in a behavior attacehd to sprite 1 i init a few properties, say

property fish, mammal, man, insect

Now this is possible:

put sprite(1).count
which would return the number of properties of the properties of the fist behavior in 
the scriptInstanceList of sprite 1

NOTE the property #spriteNum will be the last one in the list because it is created by 
Director itself, so the number returned will be Your number of props + 1

Also this works
put sprite(1).getPropAt(3)

returns
-- #man

As will this
put sprite(1)[3]

returns 
whatever value #man has in my example

If You have more than 1 behavior attached to a sprite You could use the same techinque 
on the other ones by using

put sprite(1).scriptinstanceList[2].count

and

put sprite(1).scriptinstanceList[2].getPropAt(2)

Bjarne
_______________________________________________________
If it's true that we are here to help others, then what exactly are the OTHERS here 
for?

Bjarne Nyquist
Researcher, Lingo Programmer
The Interactive Institute, phone: +46-(0)8 783 24 74
www.interactiveinstitute.se


[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