Page 1 of 1

Saving project files in livecode

Posted: Tue Jun 07, 2011 11:50 pm
by xfrios
Several times, I have rendered livecode unresponsive due to infinite or very long operations - entirely my fault.

I ended the process and lost work on a couple of occasions. I'm not sure I understand the saving part of things :shock:

When I File -> Save in the Code Editor does that save changes in all source files I have open or just the current tab?
When I File -> Save in the main menu does that save all files including the UI design?

Is there an autosave or background save option I can configure?

Also, what is the function of the 'apply' button in the code editor - does that have any impact on 'save' ?

Re: Saving project files in livecode

Posted: Wed Jun 08, 2011 12:50 am
by BvG
all things in livecode are related to stacks. if you save, you save the current stack file. that means the current stack, and it's substacks, if it has any, or alternatively it's mainstack and the other substacks that mainstack might have. So when you save a script, you're actually again saving the stack that script belongs to, be it a button on a card of that stack or whatever.

Apply never saves anything

Re: Saving project files in livecode

Posted: Wed Jun 08, 2011 11:56 am
by SparkOut
Unrelated to the saving issue but if you are sometimes forced to end the application process to escape a frozen environment, a typical cause of that is to have a handler with a repeat loop blocking the responsiveness. Putting a line "wait 0 milliseconds with messages" within the handler (say just before the end repeat) lets the engine have just enough breathing space to stop the repeat handler hogging it and perform some housekeeping, etc like checking keypresses - so you may find an escape or ctrl/cmd + c will halt a runaway handler.

Re: Saving project files in livecode

Posted: Wed Jun 08, 2011 12:56 pm
by xfrios
That's a great idea SparkOut, I'll be sure to try it next time I'm experimenting with an iterative process.