Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!news.ruhr-uni-bochum.de!news.rhrz.uni-bonn.de!RRZ.Uni-Koeln.DE!news.duesseldorf.ecrc.net!news.ecrc.de!02-newsfeed.univie.ac.at!01-newsfeed.univie.ac.at!swidir.switch.ch!in2p3.fr!oleane!jussieu.fr!mathserv.mps.ohio-state.edu!howland.erols.net!netcom.com!erkyrath
From: erkyrath@netcom.com (Andrew Plotkin)
Subject: Re: [Inform] redirecting actions
Message-ID: <erkyrathDzwL6M.Ist@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
X-Newsreader: TIN [version 1.2 PL1]
References: <54r8ti$8m4@sjx-ixn10.ix.netcom.com> <54rcgo$g9e@dfw-ixnews12.ix.netcom.com>
Date: Sat, 26 Oct 1996 22:01:34 GMT
Lines: 44
Sender: erkyrath@netcom13.netcom.com

Russell Wain Glasser (rglasser@ix.netcom.com) wrote:
> In <54r8ti$8m4@sjx-ixn10.ix.netcom.com> rglasser@ix.netcom.com(Russell
> Wain Glasser) writes: 
> >
> >    Here's something new I want to try.  Let's say you have some
> >objects, and one should "steal" the actions for the other one.  
> [snip snip snip]

>     Please disregard last posting.  The answer was so obvious I almost
> kicked myself.

> Object yorick "ghost of Yorick"
>     with react_before
>     [;
>         if (self in noun)
>             noun = self;
>         if (self in second)
>             second = self;
>     ];

I actually wouldn't do this. The noun and second variables are "owned" by 
the library, and I don't know everything the library is doing with them 
deep in the works. I'd certainly spend a lot of time inspecting the 
library source code before I started changing them on the fly.

This is safer:

Object yorick "ghost of Yorick"
    with react_before
    [;
        if (self in noun && noun == second)
            <<(action) self self>>;
        if (self in noun)
            <<(action) self second>>;
        if (self in second)
            <<(action) noun self>>;
    ];

--Z

-- 

"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the
borogoves..."
