Quit on Close -- booby trap

Sivakatirswami katir at hindu.org
Thu May 22 23:30:38 EDT 2008


I've just been informed off line that I laid a booby trap into one of my 
example revOnLine stacks that I normally deploy as a standalone:

on closestack
  quit # make sure we don't leave a hung process on the user's system
end closestack

which of course is going to cause any developer working in the IDE to 
suddenly watch his work disappear as Rev quits. Unsaved changes would be 
lost as apparently the quit command over-rides Rev's built in dialog to 
save stacks before quitting. My apologies to anyone who had this happen 
to them.

I presume that  at least one "best practice" would be to *always* use the

if the environment is "development" then
      close this stack
    else
       quit
end if

is that it? If not, please, what would the sages say that *is* best 
practice? and I will fix it.

Thanks
Sivakatirswami







More information about the use-livecode mailing list