----- Original Message -----
From: "Irv Kalb" <[EMAIL PROTECTED]>


> Only one.  There is just a single "ancestor" keyword.
>
> You can really "nest" ancestor scripts, but an ancestor script can
> set its own ancestor, etc.  But it sounds like you are looking for
> multiple inheritance - and Lingo does not allow that.

The only close solution is do a recursive search for the base class and add
a new ancestor, like this:

on addAncestor me, newAncestor
  obj = me
  repeat while ObjectP( obj.getaProp( #ancestor ) )
    obj = obj.ancestor
  end repeat
  obj.setaProp( #ancestor, newAncestor )
end

It's also worth pointing out that the same code should work as a movie
script, just don't get confused by the use of "me".

- Robert

[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