MOO-cows Mailing List Archive
[Prev][Next][Index][Thread]
Re: Caller & Player
>On Wed, 17 Jul 1996, Thomas LEVY wrote:
<...>
>'caller' is the /object/ which called this verb (or rather, the object on
>which the verb sits, that called this verb)
Um, no. The first statement is correct: caller is the object that called
the current verb. The caveat between parentheses is wrong.
Example: Object #A defines a verb :foo, which at some point calls
#X:whatever().
Object #B is a child of #A. When #B:foo() is called, it eventually calls
#X:whatever(). When #X:whatever() starts running, 'caller' equals #B, not
#A.
MOO doesn't assign a special variable to #A in this case. Other related
server types, like Cold, do.
About the original question - what's the difference between 'caller' and
'player' ? Take this LambdaCore example:
A user (#U) is sitting in a certain room (#R) types: "Hi all!
Another user (#A) is in the same room, and is told that #U said "Hi all!".
What happened in between is: #R:say was executed. It called #R:announce,
which called #A:tell.
The moment #A:tell started running, 'player' was #U, and 'caller' was #R.
-------------------------------------------------------------
Gustavo Glusman Founder/administrator of BioMOO
-- Gustavo@bioinformatics.weizmann.ac.il
-- http://bioinformatics.weizmann.ac.il/Gustavo
-- BioMOO: telnet bioinformatics.weizmann.ac.il 8888
WWW: http://bioinfo.weizmann.ac.il/BioMOO
References:
Home |
Subject Index |
Thread Index