Copying card from one stack to another
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Copying card from one stack to another
Hi,
I'm new here and it might be an obvious question, sorry for that.
One can open several stacks in LiveCode, but how to copy one card from one stack to another ? I've tried drag and drop, looked for a copy menu, with no success.
Thanks in advance
Félix
I'm new here and it might be an obvious question, sorry for that.
One can open several stacks in LiveCode, but how to copy one card from one stack to another ? I've tried drag and drop, looked for a copy menu, with no success.
Thanks in advance
Félix
Re: Copying card from one stack to another
Dictionary using "copy" has a pretty good reference about it -
Platforms: Desktop, Server, Web and Mobile
Summary:
Copies selected text or an object to the clipboard or to a card, group, or stack.
Examples:
copy
copy button "next" to group "container"
copy this card to stack "Project 1"
copy word -3 to -1 of field "output"
Use the copy command to place objects or text on the clipboard, or to make a copy of an object without changing the contents of the clipboard.
Parameters:
The object is any available object. If no object or chunk is specified, the copy command copies whatever is currently selected.
Re: Copying card from one stack to another
Thanks Bog,
I was more looking for a drag and drop sort of things, but it will do certainly.
Actually what I was aiming for can be done with the Project Browser: just grab one card from a stack and drop it in another stack.
I like however to be able to do it by code using the Message Box.
Bye
Félix
I was more looking for a drag and drop sort of things, but it will do certainly.
Actually what I was aiming for can be done with the Project Browser: just grab one card from a stack and drop it in another stack.
I like however to be able to do it by code using the Message Box.
Bye
Félix
Re: Copying card from one stack to another
Oh I am sorry then, I completely misunderstood your question, heh. I thought you wanted to code this into an application.
-
- VIP Livecode Opensource Backer
- Posts: 9663
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Copying card from one stack to another
Hi.
Welcome to LC.
Cards are special objects, very different than the controls that live on them. Though they share many attributes of controls, such as the properties that frame them, they are foundational windows and cannot be dragged, in the sense you thought.
So you must manage that under script control, as you now already know.
Craig Newman
Welcome to LC.
Cards are special objects, very different than the controls that live on them. Though they share many attributes of controls, such as the properties that frame them, they are foundational windows and cannot be dragged, in the sense you thought.
So you must manage that under script control, as you now already know.
Craig Newman
Re: Copying card from one stack to another
I think what I got from his last post is he was trying to figure out how to do this in the IDE -
Where you drag a card from one mainStack to another.
As he did find on his own, you can do this quite easily from the project browser, there are no context menus for it as he points out, but you can just drag it from one stack to the other (as well as any individual controls, etc.)
Where you drag a card from one mainStack to another.
As he did find on his own, you can do this quite easily from the project browser, there are no context menus for it as he points out, but you can just drag it from one stack to the other (as well as any individual controls, etc.)
Re: Copying card from one stack to another
I'm glad if I helped (re)discover this interesting feature that apparently is not very well known or documented (or both).
Re: Copying card from one stack to another
Yah, I think it is great, and use it all the time, but I also spend all my time in much older versions so I am a wierd duck. IF I had correctly interpreted your initial post, I would have also pointed this out, so it was a failure on my part heh.
I'm not sure about the project browser in the newest Lc's, I know reading posts between Jacque and Craig seems to indicate it tends to slow things down at the moment, but I am sure it will be fixed at some point. I don't think this works in the application browser at all, but the command line will work regardless of anything else (currently, can't speak for the future).
It is very handy, not just for moving cards, but for moving anything really, or lots of somethings. It is one of the few things I really miss when poking around in Mc, so I may have to cobble something together for that environment.
I'm not sure about the project browser in the newest Lc's, I know reading posts between Jacque and Craig seems to indicate it tends to slow things down at the moment, but I am sure it will be fixed at some point. I don't think this works in the application browser at all, but the command line will work regardless of anything else (currently, can't speak for the future).
It is very handy, not just for moving cards, but for moving anything really, or lots of somethings. It is one of the few things I really miss when poking around in Mc, so I may have to cobble something together for that environment.
Re: Copying card from one stack to another
Using the MsgBox
Linda
Thanks Bogs! This will save me a lot of time in cleaning up a project.copy this card to stack "Project 1"
Linda
Re: Copying card from one stack to another
Glad to know it is still helpful, and that you got some mileage out of it