On Fri, Dec 2, 2016 at 9:59 AM, Rick Harrison <harri...@all-auctions.com> wrote:
> Ok, so it sounds like you are using an LC stack file. > You are opening that LC stack from within LC > so LC/macOS, (assuming your are on a Macintosh Computer), > is going to update the “Date Modified” date because LC/you > have touched the file. That’s built into the OS and is > deliberate. > Yes, but changing from mode 555 to 755 is not; that's livecode. . . . > > What I do to protect myself from accidental saves is to > always work with a copy of of the file or folder. When I get onto > my computer in the morning. I first duplicate the stack > file I want to work with. I use version numbers which I > create so I can keep track of which is the current version. > Sometimes this is as simple as calling it LCStackNameV1 > or LCStackNameV2, V3, etc. If I’m really want more > information I might even include the date and/or time > with that version number: LCStackName120220161022AMV1 > Mine are generally stackname.yymmddv.livecode, where v starts at the first one, and goes on. But here's a fit of cleverness that seems to work, although it relies on the OS or user to clean /tmp from time to time: *on* saveStackRequest *--keep a copy of the stack* *local* stkNm, bkNm *put* the short name of this stack into stkNm *switch* *--livecode's own stacks* *case* char 1 to 3 of stkNm="Rev" *case* stkNm="Message Box" *pass* saveStackRequest *break* *case* stkNm begins with "dinfo_" *case* stkNm begins with "dna_" *case* stkNm begins with "out_" *--never save these* *break* *default* *--it must be a dh program stack* *lock* messages *save* this stack *put* the seconds into bkNm *convert* bkNm to dateItems *put* char 3 to 4 of item 1 of bkNm \ & char -2 to -1 of ("0" & item 2 of bkNm) \ & char -2 to -1 of ("0" & item 3 of bkNm) \ & "." \ & char -2 to -1 of ("0" & item 4 of bkNm) \ & char -2 to -1 of ("0" & item 5 of bkNm) \ into bkNm *set* the itemDel to "/" *put* char 1 to -2 of item -1 of the long name of this stack & "." before bkNm *put* "cp " & char 8 to -2 of the long name of this stack & " /tmp/" before bkNm *unlock* messages *get* shell(bkNm) *break* *end* *switch* *end* saveStackRequest So many more than time machine would do, and they go away in a couple of days if not needed. I also have a bmpVrsn routine to handle my major checkpoints through the day (bump the v above) -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode