Copy a card from one stack into a different stack

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
djkesler
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 55
Joined: Tue Jun 01, 2010 10:37 pm

Copy a card from one stack into a different stack

Post by djkesler » Tue Dec 05, 2023 12:47 am

I know the dictionary says to "copy this card to stack "whatever""", but I can not get that to work. I also tried using the card ID and the Stack ID along with other explicit naming of the card and the target stack.

I tried using the project manager to move it, but no joy. I went back to LC8 trying to find something that would work.

Are there caveats on the copy card operation that are not listing in the dictionary entry?

I had a large stack that has been regularly corrupting on a save :( and I am trying to rebuild a new stack with bits of the old one until I find where the corrupting code is located.

Any suggestions would be appreciated ..

David Kesler

djkesler
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 55
Joined: Tue Jun 01, 2010 10:37 pm

Re: Copy a card from one stack into a different stack

Post by djkesler » Tue Dec 05, 2023 3:43 pm

I found my error. If a stack is password protected and locked it won't allow a card to copied out of it.

Duh, that makes sense!

It would be nice if there was a note in the Dictionary that reminds us of that, or an error on the copy operation that warns that a password protected stack will not allow cards to be copied out of them.

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Copy a card from one stack into a different stack

Post by SparkOut » Tue Dec 05, 2023 9:44 pm

Hi, one approach that helps debugging when you get an error like this, is to check "the result" after the problematic statement. You often get a good clue, and often in real language (not just opaque codes). I don't know if that would have been useful in your situation, but maybe.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9670
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Copy a card from one stack into a different stack

Post by dunbarx » Wed Dec 06, 2023 5:37 am

What Sparkout said.

A good result is an empty result.

Craig

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”