Best way to copy from one stack to another

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Best way to copy from one stack to another

Tom Glod via use-livecode
Folks:
With all of the new versions and capabilities being added to livecode, I have found need to copy parts of one stack which is older, to a new stack, which is new and better. I have found it difficult to use cut and paste to copy groups or other elements from one stack to another using the PB.

Do I need to do this in code? Or is there an IDE way to copy groups and other elements, including their scripts, from one card of a stack to another card of  another stack?
Tnx,
Bill

William Prothero, PhD
Professor Emeritus
University of California, Santa Barbara
http://earthlearningsolutions.org

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Best way to copy from one stack to another

Tom Glod via use-livecode
Take a look at “copy” in the dictionary… I’ve used this script in a button on a card I wanted to move:

on mouseUp

copy this card to stack “targetStack"

end mouseUp



> On Sep 21, 2017, at 12:19 AM, ELS prothero via use-livecode <[hidden email]> wrote:
>
> Folks:
> With all of the new versions and capabilities being added to livecode, I have found need to copy parts of one stack which is older, to a new stack, which is new and better. I have found it difficult to use cut and paste to copy groups or other elements from one stack to another using the PB.
>
> Do I need to do this in code? Or is there an IDE way to copy groups and other elements, including their scripts, from one card of a stack to another card of  another stack?
> Tnx,
> Bill
>
> William Prothero, PhD
> Professor Emeritus
> University of California, Santa Barbara
> http://earthlearningsolutions.org
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Best way to copy from one stack to another

Tom Glod via use-livecode
On Thu, Sep 21, 2017 at 4:05 AM, Randy Hengst via use-livecode <
[hidden email]> wrote:
>
>
> copy this card to stack “targetStack"


Or even make the old stack (or a copy of oil) a sub stack of the new stack.
--
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Best way to copy from one stack to another

Tom Glod via use-livecode
Thanks, Richard. I guess I could do that for specific elements on a card too. Pretty simple. I had expected I could just cut and paste from the project browser. Just coding it is easy too.
Bill P

William A. Prothero
http://earthlearningsolution.org/

> On Sep 21, 2017, at 7:57 AM, Dr. Hawkins via use-livecode <[hidden email]> wrote:
>
> On Thu, Sep 21, 2017 at 4:05 AM, Randy Hengst via use-livecode <
> [hidden email]> wrote:
>>
>>
>> copy this card to stack “targetStack"
>
>
> Or even make the old stack (or a copy of oil) a sub stack of the new stack.
> --
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Best way to copy from one stack to another

Tom Glod via use-livecode
In reply to this post by Tom Glod via use-livecode
For some reason I've never understood, there is no menu item to copy a
card, but it is easy to do in script or the message box:

   copy this card

Once that's done you can use Cmd-V to paste the card into the target
stack. Alternately you can do:

   copy card x of stack y to stack z

For only a few cards, I usually find it easier to just leave "copy this
card" in the message box, hit the return key, and manually paste into
the target stack. After that all I have to do is navigate to the next
card I want to copy and hit the return key again in the message box.

If you have a fair number of cards to move, then a short handler with a
repeat loop is easier, using the "copy ... to" option above.


On 9/21/17 12:19 AM, ELS prothero via use-livecode wrote:
> With all of the new versions and capabilities being added to livecode, I have found need to copy parts of one stack which is older, to a new stack, which is new and better. I have found it difficult to use cut and paste to copy groups or other elements from one stack to another using the PB.
>
> Do I need to do this in code? Or is there an IDE way to copy groups and other elements, including their scripts, from one card of a stack to another card of  another stack?


--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Best way to copy from one stack to another

Tom Glod via use-livecode
Just thought I'd try this out and see if there is another option.  If you
right click on a card and dismiss the pop-up menu, then the edit menu
changes to "Cut Card", "Copy Card", "Clear Card", and "Duplicate Card"
although Clear and Duplicate don't seem to do anything.  Probably not much
more efficient than leaving "copy this card" in the message box, but may be.

On Thu, Sep 21, 2017 at 1:02 PM, J. Landman Gay via use-livecode <
[hidden email]> wrote:

> For some reason I've never understood, there is no menu item to copy a
> card, but it is easy to do in script or the message box:
>
>   copy this card
>
> Once that's done you can use Cmd-V to paste the card into the target
> stack. Alternately you can do:
>
>   copy card x of stack y to stack z
>
> For only a few cards, I usually find it easier to just leave "copy this
> card" in the message box, hit the return key, and manually paste into the
> target stack. After that all I have to do is navigate to the next card I
> want to copy and hit the return key again in the message box.
>
> If you have a fair number of cards to move, then a short handler with a
> repeat loop is easier, using the "copy ... to" option above.
>
>
> On 9/21/17 12:19 AM, ELS prothero via use-livecode wrote:
>
>> With all of the new versions and capabilities being added to livecode, I
>> have found need to copy parts of one stack which is older, to a new stack,
>> which is new and better. I have found it difficult to use cut and paste to
>> copy groups or other elements from one stack to another using the PB.
>>
>> Do I need to do this in code? Or is there an IDE way to copy groups and
>> other elements, including their scripts, from one card of a stack to
>> another card of  another stack?
>>
>
>
> --
> Jacqueline Landman Gay         |     [hidden email]
> HyperActive Software           |     http://www.hyperactivesw.com
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Best way to copy from one stack to another

Tom Glod via use-livecode
Ill be dammed. Gobsmacked. It appears that the menu *ought* to change contextually when you click on a card, but doesn't. Right clicking on the card seems to force the IDE to focus on the card itself. Neat trick. It also reveals that the IDE was written and intended to allow cut/copy/paste/duplicate cards, but somehow the ability to "click" on a card is what is missing.

Bob S


> On Sep 21, 2017, at 15:51 , Brian Milby via use-livecode <[hidden email]> wrote:
>
> Just thought I'd try this out and see if there is another option.  If you
> right click on a card and dismiss the pop-up menu, then the edit menu
> changes to "Cut Card", "Copy Card", "Clear Card", and "Duplicate Card"
> although Clear and Duplicate don't seem to do anything.  Probably not much
> more efficient than leaving "copy this card" in the message box, but may be.


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Best way to copy from one stack to another

Tom Glod via use-livecode
The other way to force the card to be selected is to double click somewhere where there are no visible objects. This will open the Card Inspector at which point the menus will work accordingly.

Bob S


> On Sep 21, 2017, at 16:12 , Bob Sneidar via use-livecode <[hidden email]> wrote:
>
> Ill be dammed. Gobsmacked. It appears that the menu *ought* to change contextually when you click on a card, but doesn't. Right clicking on the card seems to force the IDE to focus on the card itself. Neat trick. It also reveals that the IDE was written and intended to allow cut/copy/paste/duplicate cards, but somehow the ability to "click" on a card is what is missing.
>
> Bob S
>
>
>> On Sep 21, 2017, at 15:51 , Brian Milby via use-livecode <[hidden email]> wrote:
>>
>> Just thought I'd try this out and see if there is another option.  If you
>> right click on a card and dismiss the pop-up menu, then the edit menu
>> changes to "Cut Card", "Copy Card", "Clear Card", and "Duplicate Card"
>> although Clear and Duplicate don't seem to do anything.  Probably not much
>> more efficient than leaving "copy this card" in the message box, but may be.
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Best way to copy from one stack to another

Tom Glod via use-livecode
In reply to this post by Tom Glod via use-livecode
I'm astounded too. I wonder how long that's been there.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com



On September 21, 2017 6:14:49 PM Bob Sneidar via use-livecode
<[hidden email]> wrote:

> Ill be dammed. Gobsmacked. It appears that the menu *ought* to change
> contextually when you click on a card, but doesn't. Right clicking on the
> card seems to force the IDE to focus on the card itself. Neat trick. It
> also reveals that the IDE was written and intended to allow
> cut/copy/paste/duplicate cards, but somehow the ability to "click" on a
> card is what is missing.
>
> Bob S
>
>
>> On Sep 21, 2017, at 15:51 , Brian Milby via use-livecode
>> <[hidden email]> wrote:
>>
>> Just thought I'd try this out and see if there is another option.  If you
>> right click on a card and dismiss the pop-up menu, then the edit menu
>> changes to "Cut Card", "Copy Card", "Clear Card", and "Duplicate Card"
>> although Clear and Duplicate don't seem to do anything.  Probably not much
>> more efficient than leaving "copy this card" in the message box, but may be.
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode