Duplicate Substack
J. Landman Gay
jacque at hyperactivesw.com
Mon Nov 17 16:32:17 EST 2003
> On Nov 17, 2003, at 12:19 PM, R. Hillen wrote:
>
> I want some slightly different substacks; to save work, I would like
> to duplicate one substack and to modify it afterwards.
>
> How can I do that?
You clone it. After cloning, the variable "it" contains a reference to
the new object so that you can work with that new object. The clone is
an independent stack that doesn't "belong" to any mainstack. It's name
is generic. So next you set its name and mainstack properties (you must
do these lines immediately, or the "it" variable may not hold the
reference to the new stack):
clone stack "mySubstack"
set the name of it to "myNewClone" -- renames the stack
set the mainstack of it to "myMainStack" -- makes it a substack
Save the main stack file and you're done.
>>On 11/17/03 1:51 PM, Thomas J McGrath III wrote:
> I wish this was possible for cards as well as stacks and substacks.
Same thing, basically, only you don't need to assign a mainstack because
new cards are automatically created in the same stack as the original:
clone this card
set the name of it to "myNewCard"
Cloned cards are placed immediately after the original in the stack.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list