I have a project file, say, myproject.livecode
I open it, work on it, and at some point click a button which saves a backup copy named my project-datetimestamp.livecode in a different folder (say, dropbox).
I work on the stack some more, save by hitting command-S, and quit Livecode.
When I open LiveCode again, my project.livecode contains none of the edits of the previous session.
The backup copy contains all of them. This means I have to replace the original with the backup copy before proceeding.
It seems when I save a backup copy, the current stack ceases to be the original stack but points towards the backup copy.
This is quite annoying and could lead to inadvertent errors.
How do I correct this behavior?
Thanks,
Sri
How to prevent backup copy from taking over?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: How to prevent backup copy from taking over?
Hi Sri,
I ususally create a tiny stack (as palette) for my projects with one button with a script like this:
You get the picture
Best
Klaus
I ususally create a tiny stack (as palette) for my projects with one button with a script like this:
Code: Select all
on mouseUp
## Save original stack file:
save stack "myproject"
## Create filename with timestamp:
put "myproject" & the seconds & ".livecode" into tFile
put the filename of stack "myproject" into tSource
## Copy saved stack to backup or Dropbox folder:
put url("binfile:" & tSource) into url("binfile:" & "path to dropbox/or backup folder/here/" & tFile)
end mouseUp

Best
Klaus
Re: How to prevent backup copy from taking over?
Hi Klaus:
Thanks for the idea.
I guess there is no in-built way to do this in LC, so we need workarounds.
It would be nice if LC had a menu option "Backup" which would back up the current stack in the default back up folder with the default suffix (such as date stamp).
Regards,
Sri.
Thanks for the idea.
I guess there is no in-built way to do this in LC, so we need workarounds.
It would be nice if LC had a menu option "Backup" which would back up the current stack in the default back up folder with the default suffix (such as date stamp).
Regards,
Sri.