Often if it looks like messages aren't being sent, what is really happening is that there is a script error somewhere that is aborting everything that follows. One way to find out if that's the case is to add an errorDialog handler to the stack script, and have it tell you if a script error occurs. Put this into the stack script:
Code: Select all
on errorDialog pErr
answer "An error occured:" && pErr
end errorDialog
Errors will be returned as a series of cryptic numbers. If you look up "errorDialog" in the dictionary it explains what those numbers mean. Another way to look them up is to get the LiveCode Error Lookup stack from the User Samples area. You can type in the first number returned, and it will give you the same error description that the IDE does.
A fancier way to do the same thing is write the error to a text file on disk instead of using "answer." That lets you copy the error text and paste it into the multi-line lookup field in the Lookup stack. Usually a single error triggers a whole sequence of related errors, and seeing them all at once tells you the "chain of command" that is failing.
It's easier to see it than explain it. For most purposes, usually all you need to look up is the first number in the list on the top line, so "answer" is good enough.