Carl West wrote

        "Getting back to the original question:

        If you are dropping the behaviours on the sprites on the stage by hand
        or assigning them in the score, they'll know their own spriteNum. But if
        you're assigning them on the fly with Lingo they won't, you'll need to
        do it with something like:

        Have I struck close to the problem?"


I am dropping the behaviour onto the sprites by hand - so in theory they
should know their own spriteNum?

Anyway after looking at the occasions where me.spriteNum is working in my
code and where it isn't - I have come to the conclusion it must be something
to do with the way the handler is being called. With the one in question,
i.e a drabbable note, when you drop the note onto the stave the note
behaviour sends a message to a "Stave Manager" behaviour

i.e   sendSprite(pSprite_Number_Of_Stave_Manager,
#Drop_A_Note_At_This_Position, pCurrent_X_Position,�
        pCurrent_Y_Position, pMidi_Instrument_Number,pInstrument_Icon_Number)

This "Stave Manager" behaviour then sends a message back to the note
behaviour (not by using a return value)

i.e   sendSprite (pSprite_Number_Of_Current_Note, #Display_Note_Here,
pCurrent_Beat_Location, pCurrent_Note_Location,�
        pInstrument_Number, pInstrument_Icon_Number)

I think the confusion must lie here - looking at the code I can see it was
one of those 3 in the morning solutions :)

Thanks to everyone who responded to my question.

Paul





--
Carl West    [EMAIL PROTECTED]
617.262.8830 x246

I have no superfluous leisure; my stay must be
stolen out of other affairs; but I will attend you awhile.

           - Isabella, Measure for Measure, Act 3 Scene 1

[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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/LUJ/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