Pending messages - ID numbers where?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

Pending messages - ID numbers where?

Post by chris25 » Wed Dec 04, 2013 4:33 pm

Reading through both the pendingmessages and the cancel command in the dictionary I can not understand where you find the id's of messages not yet executed so that they can be put into a variable.

The numbers that appear in the message box are changing rapidly, so this can not be them.

Though reading this is a clue to something?, The ID number of the message is returned by the send command that sent the message. What really does this mean? And how does one find the ID number of a pending message please?

Thankyou
chris

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Pending messages - ID numbers where?

Post by Klaus » Wed Dec 04, 2013 5:13 pm

Hi Chris,

from the dictionary about "send":
...
If you specify a time, the message is sent to the object after the specified time has elapsed. The message is added to the pendingMessages function.
The ID of the message is returned by the result function. To cancel the message, use the cancel command with this ID.
...
8)

Code: Select all

...
send "whatever" to me in 10 secs
## Here you will get the ID, make it a local or global or carrot 8-)
put the result into tMessageID
...
Best

Klaus

chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

Re: Pending messages - ID numbers where?

Post by chris25 » Wed Dec 04, 2013 5:28 pm

thankyou Klaus. It makes sense now.

Post Reply