The openStack message is sent after the stack is visible.
on openStack send "rollCredits" to field "Credits" end openStack
Use the openStack Message handler to change a stack's objects, or perform other updates, when the stack is opened.
The OpenStack message is sent to the current card, but if it isn't the card, it's sent to the stack. So if you put a Openstack Message handler both in stack and in card, only the one in the card will be executed.
To make changes that take effect before the stack becomes visible on the screen, use a preOpenStack handler instead of openStack.
on OpenStack if the owner of the target is me then -- code runs for this stack only answer "Opened mainstack" else -- code runs for any stack that's opened other than this one answer "Opened a Substack" end if end OpenStack
The actual opening is not triggered by the openStack message, so trapping the message and not allowing it to pass does not prevent the stack from opening.