Round Trip: script-only stacks

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: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10448
Joined: Fri Feb 19, 2010 10:17 am

Round Trip: script-only stacks

Post by richmond62 »

Is it possible to:

1. Save a binary stack as a script-only stack?

2. Save a script-only stack as a binary stack?

If, in case #1, a binary stack contains images and other objects, do they get lost on conversion to a script-only stack?
Emily-Elizabeth
Posts: 225
Joined: Mon Jan 03, 2022 7:10 pm
Contact:

Re: Round Trip: script-only stacks

Post by Emily-Elizabeth »

Yes, all controls and other imported binary data would be lost. The revMenubar shows how to create a stack with controls and images from a script only stack.

Going from a script only stack to a binary stack would just require you to copy and paste the code into the stack/card script (or where ever)
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10448
Joined: Fri Feb 19, 2010 10:17 am

Re: Round Trip: script-only stacks

Post by richmond62 »

Going from a script only stack to a binary stack would just require you to copy and paste the code into the stack/card script (or where ever)
emphasis is mine.

Frankly having to copy-paste each script into each object sounds like a 'right bother'.
ClipArtGuy
Posts: 272
Joined: Wed Aug 19, 2015 4:29 pm

Re: Round Trip: script-only stacks

Post by ClipArtGuy »

richmond62 wrote: Thu Aug 27, 2026 6:39 pm
Going from a script only stack to a binary stack would just require you to copy and paste the code into the stack/card script (or where ever)
emphasis is mine.

Frankly having to copy-paste each script into each object sounds like a 'right bother'.

You can create a script only stack that builds an entire GUI stack with objects etc from a single paste. For example, the demo for the SoudiumXT widget library is a single .livecodescript file that can be pasted into a stack script. Saving and re-opening (or firing a preopenstack from the message box) builds the entire stack from a single paste.

https://github.com/SethMorrowSoftware/S ... codescript

of course for the functionality to actually work, you will need to have SodiumXT installed.

EDIT: All of these demos are each built from a single lievcodescript file.
sodiumXT.png
holdem.png
NOSTR.png
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10107
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Round Trip: script-only stacks

Post by FourthWorld »

A script-only stack contains only the script of the stack.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
ClipArtGuy
Posts: 272
Joined: Wed Aug 19, 2015 4:29 pm

Re: Round Trip: script-only stacks

Post by ClipArtGuy »

That is a fair distinction. My point was that it is possible to build a GUI app from a single script only stack, including all objects, etc without having to manually apply scripts to each object.
Emily-Elizabeth
Posts: 225
Joined: Mon Jan 03, 2022 7:10 pm
Contact:

Re: Round Trip: script-only stacks

Post by Emily-Elizabeth »

You can always include images as base64 encoded data in the stack only script. It'll make your stack balloon in size, but no dependencies is nice too
Post Reply