Quit on closestack and Standalone

I put this script in the stack script
on closestack
quit
end closestack

But when I want to create a standalone, Livecode quit also !
LCC DP5 macOS 13

Presumably you’re referring to LC Classic/10 rather than Create?
I don’t think you can create standalone in Create!

For “classic” questions, you’re better off posting in the official forum (the TOF if you will :wink: )

If you’re running this inside the IDE it can and will quite the IDE. You can guard against this with the environment function:

on closeStack
   if the environment is "standalone application" then quit
end closeStack




PS: for code use the backtick `
On Macs, this is the key next to “Z” that also gives the tilde ~, not sure where it is on Win boxes.

For inline code surround the code with a single backtick each end: this is inline code for example

For code blocks, such as what I posted above, use 3 back ticks on the line before and after the code block, for example:

block line 1
block one 2
1 Like

Hello,

I’ve used an alternative :

if the environment <> “development” then quit

But it seemed to me that with previous versions of Livecode, this problem didn’t exist.

I dunno, I’ve always had this issue, so have used the code above…