duplicate/copy sub-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
billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

duplicate/copy sub-stack

Post by billworld » Fri Oct 31, 2008 5:58 pm

Is it not possible to duplicate a sub-stack?

Or, what about saving a sub-stack and re-inserting into the Main Stack?

Not seeing anything on this in the docs, or maybe I've missed it.

There's instances where I need to use a sub-stack's contents as the basis for a new sub-stack. Surely this is possible?

Thanks

Bill

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte » Fri Oct 31, 2008 6:28 pm

Hi Bill,

if you open the dictionary, please look at the entries for copy, clone, mainstack and save as.

Cheers,

Malte

billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

Post by billworld » Fri Oct 31, 2008 8:17 pm

Thanks. I searched around for "duplicate" in various sources (e.g. docs and dictionary) and didn't find an answer. Okay, it's called "clone" here and evidently the way to clone/duplicate/copy a sub-stack is only via programatic means. Sure would be nice for RR to have a menu option for this, then I could keep with the UI design without searching around and fuddling with code... Sorta takes one out of the creative moment.

Thanks.
malte wrote:Hi Bill,

if you open the dictionary, please look at the entries for copy, clone, mainstack and save as.

Cheers,

Malte

billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

Post by billworld » Wed Nov 05, 2008 7:21 pm

Okay, I finally got around to this. So, I have sub-stack which I desire to copy and use as the basis for a new substack (Since RR doesn't allow two window views into the same stack, I have to clone the stacks).

When I clone the substack, rather than create a copy of said substack placed within the MainStack, RR creates a new MainStack based on the cloned substack. Okay, so how then do I insert this MainStack into my "real" MainStack as a sub-stack? Why doesn't RR by default clone a sub-stack and keep it as a sub-stack of the existing MainStack?

I've searched for "import", "insert", "clone", "copy" and am not seeing the answer. Surely this is possible?

Thanks

Bill


billworld wrote:Thanks. I searched around for "duplicate" in various sources (e.g. docs and dictionary) and didn't find an answer. Okay, it's called "clone" here and evidently the way to clone/duplicate/copy a sub-stack is only via programatic means. Sure would be nice for RR to have a menu option for this, then I could keep with the UI design without searching around and fuddling with code... Sorta takes one out of the creative moment.

Thanks.
malte wrote:Hi Bill,

if you open the dictionary, please look at the entries for copy, clone, mainstack and save as.

Cheers,

Malte

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Wed Nov 05, 2008 9:11 pm

You can set the 'mainStack' property of the fresh clone to your original mainstack. I'm guessing that Revolution assulmes you're either cloning the substack to use it as an 'editor' template stack, or because you want to include it into a different mainstack.

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

Post by billworld » Wed Nov 05, 2008 9:51 pm

Got it. Thanks!
Janschenkel wrote:You can set the 'mainStack' property of the fresh clone to your original mainstack. I'm guessing that Revolution assulmes you're either cloning the substack to use it as an 'editor' template stack, or because you want to include it into a different mainstack.

Jan Schenkel.

Post Reply