Stack with the same name loop
marksmithhfx at gmail.com
Fri Oct 8 09:53:17 EDT 2021
> On Oct 7, 2021, at 5:28 PM, Mark Waddingham via use-livecode <use-livecode at lists.runrev.com> wrote:
> As I said, this isn't anything to do with 'Save As' specifically - 'Save As' is doing precisely what you would expect... i.e. Saving the stackfile to a different file, and just as when you do that in any other application the filename of the stack changes to be the new filename.
This has often puzzled me, but when I use 'Save As’ most of the time this leaves me with 2 stacks in memory, which, if both have the same DG in them, is sort of a no-no situation in LC (the IDE cannot distinguish between 2 stacks with the same name etc...). Here’s my workflow: generally I append a sequential number anytime I am going to attempt something new or substantial, so I can easily rollback. Say I am working on VER50. I decide to add a new feature but think I may screw it up. In VER50 I rename the stack to VER51 (change the stack name) and then save it using 'Save As' as VER51 (usually in a new folder). In such a scenario I would expect to have 1 stack in memory, now called VER51. But I don’t. I have 2 identical stacks (same # of script lines) one named VER50 and another named VER51. To avoid potential cross contamination I have to quit LC and restart with VER51.
OR, I could do as Jacque suggests and quit LC, copy VER50 to VER51 on disk and then open VER51. Either way requires quitting and relaunching LC. But, if I was in MS Word and copied an open file from VER50 to VER51 and looked under the Window menu I would see only 1 file named VER51. VER50 is safely tucked away, ne'er to be effected if I screw up 51. I’m not sure if there is a good reason why LC behaves differently.
More information about the use-livecode