Continuing a script after cloning a stack

Peter Haworth pete at
Thu May 23 17:53:45 EDT 2013

Hi Richard and Jan
Locking messages fixed the problem.

This is a general purpose routine so I have to deal with any preOpenxxx and
openxxxx handlers that might be in the stack.  I think I will have to add
code to close and re-open the stack after the renaming and setting of the
main stack once I have unlocked messages.

Richard - do you think I should  enter a QCC report for this then?  It does
seem like inconsistent behavior when compared to any other time a stack is
opened by script.

lcSQL Software <>

On Thu, May 23, 2013 at 12:43 PM, Richard Gaskin <ambassador at
> wrote:

> Peter Haworth wrote:
>> I have a script that clones a substack, followed by some other commands to
>> rename the cloned substack and set it's mainstack.  As soon as the clone
>> command is issued, control passes to the cloned stack and the rest of my
>> script is ignored.
> We could expect focus to change to the new stack, but not the script
> stopping altogether.
> If locking messages before running your script fixes the problem, this may
> be a bug in the IDE which should be fixed ASAP IMO.
> --
>  Richard Gaskin
>  Fourth World
>  LiveCode training and consulting:
>  Webzine for LiveCode developers:
>  Follow me on Twitter:**FourthWorldSys<>
> ______________________________**_________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:

More information about the use-livecode mailing list