strange clone behaviour: bug?
wouter.abraham at pi.be
Tue Jul 13 07:42:59 CDT 2004
> Re: strange clone behaviour: bug?
> • From: andreas
> • Date: Tue, 13 Jul 2004 04:46:47 -0700
> Hi Wouter
> thanks for your hints - all Variables are globals and have
> I just isolated the code that clones the cards to 2 new stacks:
> Stack A: sends the Klonen message to substack B:
> send Klone to stack "substackB"
> strange: in the new created stacks this works fine!
> No errors with cloning.
> I will experiment with this stack to produce the cloning error
> and hope to post this soon.
> Every hint is welcome!
Ok, it were globals (difficult to tell from your original post :-)
If you want to clone a card from stack A into stack B and stack B is
the default stack you can use:
clone card ZuKopieren of stack < stackname>
the card from stack A will be cloned into stack B after the card where
"klonen" was ordered.
!!! very important:
first you have to check the cantmodify of stack <stackname>.
- If set, you first have to set it to false, clone the card and reset
Or you get an error message telling you the stack is locked.
- If not set, you can clone straight away.
so your script could become something like:
global ZuKopieren, Schuelername,gStack2Copy2, gStack2CopyFrom
put ZuKopieren & "_" & Schuelername into NeuerName
put the cantmodify of stack gStack2CopyFrom into tCantModif
set the cantmodify of stack gStack2CopyFrom to false
--go card ZuKopieren
set the default stack to gStack2Copy2
clone card ZuKopieren of stack gStack2CopyFrom
set the cantmodify of stack gStack2CopyFrom to tCantModif
set the name of it to NeuerName
More information about the use-livecode