View/Edit #1:ancestors

Switch to edit mode.

Name(s): ancestors
1:  "Usage:  object:ancestors()"
2:  "Return a list of all ancestors of this object."
3:  "If called with a single object, the result will be in order ascending up the inheritance hierarchy.  If called with multiple objects, it probably won't."
4:  if (!valid(parent(this)))
5:    return {}
6:  else
7:    return {parent(this), @parent(this):ancestors()}
8:  endif
9:  "This appears to be the 'old' way of doing ancestors."
10: "It was before people discovered you don't have to pass arguments around for no apparent reason."
11: "args = setadd(args, this);"
12: "ret = {};"
13: "for o in (args)"
14: "  ret = $set_utils:union(ret, o:ancestors());"
15: "endfor"
16: "return ret;"
17: "Last modified by Slacker (#55) on Mon Jun 21 05:46:05 1999 MDT."
18: "This verb previously owned by manta (#7165), and chowned to $slacker upon dewizarding (Sat Aug 17 14:50:03 2002 MDT)."
19: "Last modified by Cecil (#7407) on Fri Oct  4 12:30:46 2002 MDT."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Hacker (#60)

You are not logged in.

[home | help | who | search | setup | code]