Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
I have an unusual issue here. I've got the following code, and it seems to exit after it hits the go to card tCardName of stack "Print" line. Can anyone shed any light why the function would stop exiting if it went to a card. I've put in breakpoints and walked through, it doesn't seem like its executing any script when it opens the card and the current script I am in seems to exit after the card appears on the screen.
------------<Start building the pages>--------------
put the visible of group tPrintObjectLine of card "Stationary" of stack "Stationary" into tVisible
set the visible of group tPrintObjectLine of card "Stationary" of stack "Stationary" to true
copy group tPrintObjectLine of card "Stationary" of stack "Stationary"
set the visible of group tPrintObjectLine of card "Stationary" of stack "Stationary" to tVisible
put "Print " & tPageNo into tCardName
lock screen
go to card tCardName of stack "Print"
put the number of elements of tGrid into tGridCount
repeat with tIndex = 1 to tGridCount
...... more code
end repeat
Last edited by jalz on Sun Apr 23, 2017 11:09 am, edited 1 time in total.
Try adding "lock messages" in a new line immediately following "lock screen". If that fixes the problem then you probably have one of the "open" messages ("preOpenCard", preOpenBackground", "openCard", etc.) being triggered in a shared group, a card, the stack, or (if the Print stack is a substack) the mainstack of the stackffile.
Richard Gaskin LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
That seemed to worked. I cant seem to find the open messages that may be causing this but I presume the lock messages command can be used permanently to rectify the open messages being triggered.
I wrote a utility that will log messages and triggered handlers in an indented list to make it easy to track such things down.
You can get 4W Flight Recorder in the Stack Files section of LiveNet, a plugin pre-installed with LiveCode (in the LC menu bar see Development -> Plugins -> GoLiveNet ).
Richard Gaskin LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn