Save Changes Using Stack Player

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
Posts: 76
Joined: Sat Nov 23, 2013 8:57 pm

Save Changes Using Stack Player

Post by TerryL » Mon Jan 11, 2016 8:08 pm

A stack player may be useful distributing your stacks to those who don't want to install the LiveCode program, or to help convince them installing and learning to code with LiveCode might actually be fun.

Save changes to the stack being played with a closeStackRequest handler placed in its stack script.

on closeStackRequest --in stack script, File > Close, red "X" / close dot
answer "Save changes?" with "Cancel" or "OK" titled "Save Changes"
if it = "OK" then save this stack as (the effective fileName of this stack) --save changes
pass closeStackRequest --allow user to close/quit
end closeStackRequest

Here's an example of a stack that becomes a Stack Player when made into a desktop standalone. Instructions included.
(2.66 KiB) Downloaded 60 times
Below are more example stacks on my web page. Terry
Beginner Lab (LiveCode tutorial) and StarterKit (my public stacks)

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”