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!]

Reply via email to