J. Landman Gay
jacque at hyperactivesw.com
Sun Mar 3 13:57:50 EST 2013
On 3/3/13 12:28 AM, Timothy Miller wrote:
> Do you mean to say I can have the same stack open in two copies of
> LiveCode, resulting in two windows? Are two copies of the same
> version of LiveCode okay?
> This sounds wrong, but who am I to say? I assumed I would get a "file
> in use" error if I tried to open the same stack with a second copy of
You can have any number of LiveCode engines open at the same time, and
they can all open the same stack. You won't get any errors, but that's
why it's dangerous -- it is very easy to overwrite the stack with
changes from a different engine.
> Let's say I go to card 10 in one window, go to card 20 in the other
> window. I cut some text from a field on card 10, bring the other
> window to the top, paste the text into a field on card 20…
> This will work? The cut stays cut, the paste stays pasted? No
> problems? I don't end up with two copies of the same stack?
Nothing will happen to the file on disk until you save it. Remember that
stacks exist only in memory until they're saved. Copy 1 of LiveCode
won't know a thing about the changes you made in Copy 2. The dangerous
part is when you save to disk in one copy and don't reload the other
copy. If you keep saving changes across both copies, each change will
overwrite the other.
I've lost data that way which is why I said it gets iffy. In general I
consider one copy to be a scratchpad. I copy stuff from there, make
temporary changes to see how they look, do other stuff I don't intend to
save. Your cut and paste idea wouldn't work too well here because
nothing would be cut from the "master" copy.
When it's time to close the temp stack, do NOT save it. Only save your
master copy to disk.
Here's an even iffier way to do it: Sometimes I make changes to the temp
copy that I decide I want to keep. That's where the save and reload
procedure is handy, but you do need to be careful you aren't overwriting
changes from the other copy. The "revert" command is handy to reload a
stack from disk without having to close and reopen it. If the stack has
been saved in Copy 1, click over to Copy 2, issue "revert" from the
message box, and the Copy 1 changes will show up in Copy 2. "Revert"
just means "reload this file from disk."
I position the two open copies of the stack in different places so that
visually I always know which one I'm working on, and it's easy to click
back and forth between them. (Which is why, for how I work, using
separate desktop spaces wouldn't work too well.)
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the Use-livecode