If I issue a dispatch or send command to an object on a card that is not open at the time, what happens to the resulting message? Does the object see it even though the card is not open, or is it somehow queued until the next time the card is opened, or does it just disappear never to be seen again?
Thanks,
Pete
dispatch/send question
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: dispatch/send question
Hi Pete,
If the stack with the object is available in memory, the message will pass all the objects until it is caught by a handler and executed.
If you use the send command and the object is not in memory or the object doesn't exist or if the message isn't caught by a handler, you will get an execution error. If you use the dispatch command, you won't get an error (according to the docs).
Best,
Mark
If the stack with the object is available in memory, the message will pass all the objects until it is caught by a handler and executed.
If you use the send command and the object is not in memory or the object doesn't exist or if the message isn't caught by a handler, you will get an execution error. If you use the dispatch command, you won't get an error (according to the docs).
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: dispatch/send question
Thanks Mark. I guess I'm not familiar enough with Rev to know just what "in memory" means. Let's say I'm in the IDE and open my main stack file which has several substacks, none of which are opened at startup. Does the fact that I opened the main stack mean that all the substacks are in memory, or do the substacks have to be opened before they're in memory?
Thanks,
Pete
Thanks,
Pete
Re: dispatch/send question
Hi Pete,
After a stackfile is opened, all substacks that are part of that stackfile are in memory.
Best,
Mark
After a stackfile is opened, all substacks that are part of that stackfile are in memory.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode