OpenCard and preOpenCard Odd Behavior

Dar Scott dsc at swcp.com
Sun Jul 7 16:25:26 EDT 2013


Perhaps a script is put into the front scripts.  

For example, you mentioned a preOpenCard and openCard being defined in the stack.  If the stack was put into the front scripts, then it would block those in the card.

Or it could be something else put into the front scripts.  

You could (in message handlers) pass these messages to make sure all handlers in the scripts see them.  It does no harm for the last one to pass.  If the handler might be in the message path several times, then either detect the repeat or make the operation short and harmless, that is, ending up with the same state.  For example if the script handers do general card set up and the card handler does card specific setup, then the card specific one could pass to the stack handler.  (But, as I mentioned, if the stack script is put in front, then it will execute first.)

Dar


On Jul 7, 2013, at 11:08 AM, Roger Guay wrote:

> I have a stack of 6 cards, the first card of which has both a preOpenCard and an openCard script. These scripts execute properly when the stack is first opened, but they fail to execute if the first card is revisited (after the stack is open). Other cards in this stack have preOpenCard and OpenCard scripts that always execute when the card is visited.
> 
> Can someone please suggest what might be going on here? 
> 
> Thanks,
> Roger
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list