OpenCard and preOpenCard Odd Behavior

Roger Guay irog at mac.com
Sun Jul 7 17:22:42 EDT 2013


Me again. I found my problem . . . by message watching (Thank you, Craig). I found that I had an "Exit to top" script on CloseCard of the card I was leaving to go to the first cd. I'm not sure why that matters, but everything works fine if I remove "Exit to top"

Thanks to all for your help!

Cheers,
Roger


On Jul 7, 2013, at 3:07 PM, Roger Guay <irog at mac.com> wrote:

> I'm so sorry folks, I had to run an errand and came back to realize I misspoke!! I DO NOT have openCard and PreOpenCard scripts at the stack level.
> 
> Jacque, I am merely navigating between cards in my problem stack that gives me this grief
> 
> Craig, I'm checking the Message Watcher, but so far I'm not seeing what's causing my problem. Sure enough the MessageWatcher confirms that OpenCard and PreOpenCard are not executing when revisiting the first card, but are when first opening the stack.
> 
> Dar, I don't think there are any front scripts . . . certainly none of my own. Could there be others not of my doing? 
> 
> Roger
> 
> 
> On Jul 7, 2013, at 2:25 PM, Dar Scott <dsc at swcp.com> wrote:
> 
>> 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
>> 
>> 
>> _______________________________________________
>> 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
> 
> 
> _______________________________________________
> 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