Rob, Thank you to you and James for the clarification.
> I used to use sprite(x).call on occasion but now avoid it completely. I agree. I can't see a good reason to use the dot syntax. Anthony www.lifelinestudios.com ----- Original Message ----- From: "Rob Romanek" <[EMAIL PROTECTED]> To: "Lingo programming discussion list" <[email protected]> Sent: Wednesday, March 09, 2005 11:14 AM Subject: Re: <lingo-l> sprite communication syntax? > Hi Anthony > > In the handler being called include the following statement > > put me > > You will see that in the sendSprite approach me is a reference to the > instance of the behaviour while in the sprite(x).call approach me is > sprite(x). This can cause some confusion as to what the rest code is > referencing. I used to use sprite(x).call on occasion but now avoid it > completely. > > -hth > > Rob > > On Wed, 9 Mar 2005 10:45:42 -0600, Anthony W. Fouts, Jr. > <[EMAIL PROTECTED]> wrote: > > > I have been using the following syntax for quite some time for calling > > methods in behaviors attached to sprites: > > > > -- sendsprite(spriteNum, #callSomeMethod, someParameter) > > > > It occurred to me that I call methods in child objects stored in > > variables > > using dot syntax . So I tried the following to call a method in a > > behavior > > attached to sprite: > > > > -- sprite(spriteNum).callSomeMethod(someParameter) > > > > However it produced unexpected results. How does the second differ from > > the > > first? > > > > > > [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!] > [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!]
