Page 1 of 1
Copy card from one file to another
Posted: Sat Jan 17, 2015 10:20 am
by davidmills
Try as I may to find what appears to be a simple task, I'm just not finding the answer on my search on Google and here.
I now realise I probably should have created two stacks in one file for testing two related projects and not one stack in two files.
Dave
Re: Copy card from one file to another
Posted: Sat Jan 17, 2015 12:52 pm
by Klaus
Hi David,
sorry, not the slightest idea what you are after!?
Best
Klaus
Re: Copy card from one file to another
Posted: Sat Jan 17, 2015 1:56 pm
by davidmills
Wow Klaus. There was me thinking it should be easy to do a card copy and I'm incapable of explaining my requirement to the members here and so guess I'm doomed with LC.
I have two LC Applications (should not have called them files) for use on an Android and I'm using a Windows 7 PC running LC Community 7.0.1.
one LC Application is named File1.livecode
the other LC Application is named file2.livecode
I want to copy a card and all it's contents from File2.livecode to File1.livecode which I thought would be a copy and paste.
If I was doing this card copy in a single application I would use the Message Box with 'clone this card'.
I think I have now explained my requirement.
Dave
Re: Copy card from one file to another
Posted: Sat Jan 17, 2015 2:01 pm
by Klaus
Hi Dave,
you are not doomed, promised
OK, open both stacks and then you can do this in the message box or with a button:
...
copy cd "name of cd 2 copy" of stack "file2" to stack "file1"
...
"CLONE" will create copy of a card, but in the SAME stack!
Best
Klaus
Re: Copy card from one file to another
Posted: Sat Jan 17, 2015 2:11 pm
by davidmills
Thanks Klaus and also for the clone tip.
Why is it - copy cd "name of cd 2 copy" of stack "file2" to stack "file1" and to use 'cd' and not use 'card''?
Dave
Re: Copy card from one file to another
Posted: Sat Jan 17, 2015 2:15 pm
by Klaus
"Lazy moi" is using abbreviations whenever possible!
cd = card
btn = button
fld = field
grc = graphic
sb = scrollbar
etc...
Re: Copy card from one file to another
Posted: Sat Jan 17, 2015 2:22 pm
by davidmills
Thanks again.
Dave