How to copy a card to another card in the same stack

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!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
phaworth
Posts: 592
Joined: Thu Jun 11, 2009 9:51 pm

How to copy a card to another card in the same stack

Post by phaworth » Mon Aug 17, 2009 4:21 am

I need to be able to create a card in a specific stack by copying it from a "template" card in that same stack, in other words, the new card should have all the same fields and layout of the template card. I am not in the stack in question when I need to do this.

I got as far as setting the defaultStack and using the create command but that just create an empty card.

Could someone enlighten me please!

Thanks,
Pete

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Post by mwieder » Mon Aug 17, 2009 7:12 am

try

copy card "template"
paste

phaworth
Posts: 592
Joined: Thu Jun 11, 2009 9:51 pm

Post by phaworth » Mon Aug 17, 2009 6:33 pm

Thanks, that got me on the right track. Seems that your can copy an object to another object so I didn;t need the paste. But do need to rename the new card with set Title afterwards.
Pete

Post Reply