Page 1 of 1

dispatch/send question

Posted: Sat Apr 10, 2010 11:29 pm
by phaworth
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

Re: dispatch/send question

Posted: Sun Apr 11, 2010 3:06 am
by Mark
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

Re: dispatch/send question

Posted: Sun Apr 11, 2010 7:08 am
by phaworth
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

Re: dispatch/send question

Posted: Sun Apr 11, 2010 3:01 pm
by Mark
Hi Pete,

After a stackfile is opened, all substacks that are part of that stackfile are in memory.

Best,

Mark