Dumb Question -- Copying/Moving substack between stack files

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
shrink2fit
Posts: 6
Joined: Wed Jan 14, 2015 12:03 am

Dumb Question -- Copying/Moving substack between stack files

Post by shrink2fit » Mon Jun 16, 2025 10:58 pm

Hello!

How do I 'cut' a substack from one stack file and 'paste' it into a different stack file? Moving (cut/paste) stacks between stack files seems like such a basic need that I am sure I am completely missing something obvious.

I have read in the guide docs that setting the main stack property of a substack will move it to the new main stack file, but it doesn't work for me. I've also experimented with the reverse strategy of changing the substacks property, but again without success.

A clue would be wonderful!

Thanks!

Jonathan

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Dumb Question -- Copying/Moving substack between stack files

Post by dunbarx » Tue Jun 17, 2025 4:39 am

Hi.

You can set the "mainStack" property of your subStack to the, er, mainStack of your choice. Read this in the dictionary. Know that doing so may change the file that "owns" that stack.

Craig

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Dumb Question -- Copying/Moving substack between stack files

Post by Klaus » Tue Jun 17, 2025 8:44 am

Yes, setting the mainstack to another stack will definitively MOVE that substack, see screenshot.
"substacka" was a substck of stack "stacka"

Hint: Both mainstacks need to be open for this!

Best

Klaus
Attachments
substacks.png

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10080
Joined: Fri Feb 19, 2010 10:17 am

Re: Dumb Question -- Copying/Moving substack between stack files

Post by richmond62 » Tue Jun 17, 2025 9:47 am

You can also set the mainStack of a substack via the properties palette of the substack.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Dumb Question -- Copying/Moving substack between stack files

Post by dunbarx » Tue Jun 17, 2025 4:30 pm

Shrink2Fit:

And remember, there are no dumb questions.

Only dumb answers.

Craig

Post Reply