Michael,

> Put the timeoutlist[1] works, but I need to access by name, not item,
> because there may be more than one timeout going on.  Any ideas?

The timeout list is a _linear_ list of timeout object references, therefore you don't 
get named access. Your getPos call will fail because in essence you're searching for 
"timeout("wiper")" in the list and you're not going to find it (you're searching a 
list of _timeout_object_references_ by calling getPos() and provided a string).

If you need to access by name walk the timeout list and query the name property of 
each one until you find the object of concern or not:

tPosn = getTimeoutIndex()

on getTimeoutIndex ()

  tIndex = 0

  tCount = (the timeoutList).count
  repeat with a = 1 to tCount
    if (the timeoutList)[1].name = "wiper" then
      tIndex = a
      exit repeat
    end if
  end repeat

  return tIndex

end getTimeoutIndex

Or you could follow Karina's advice and just access the object by name, the trouble 
with that is if you're trying to see if a timeout object by the name of "wiper" exists 
or not. The moment you use 'timeout("wiper")' the object will be created if it doesn't 
exist already. So if you just need to access it, follow Karina's idea. If you need to 
detect whether a timeout with a given name exists, then follow something like my idea 
above.

Cheers,
Tom Higgins
Product Specialist - Director Team
Macromedia

DIRECTOR, de lekkerste!

...

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/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