Two Windows

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Two Windows

Timothy Miller-2
Hello,

When working on a long and complex document with a word processor, I sometimes find it useful to display the same document in two windows, simultaneously. I can cut and paste from one window to the other, or read one part of the document while typing in another, and so on.

Now I have this large LC stack, mostly text, with about 2000 cards. It might be convenient to have two windows open, both displaying the same stack, so I could read one card, while typing in another, or cut from one card and paste into another without navigating back and forth in the usual way.

I suppose there is a way to do this. Can I have a hint, please?

Tim Miller

P.S. I, too, am delighted about the Kickstarter success, and did what I could to help it along.



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Two Windows

dunbarxx
Hi.


Why not just make a copy of the file? You will want to name the stack itself differently.


Craig Newman



-----Original Message-----
From: Timothy Miller <[hidden email]>
To: How to use LiveCode <[hidden email]>
Sent: Sat, Mar 2, 2013 2:30 pm
Subject: Two Windows


Hello,

When working on a long and complex document with a word processor, I sometimes
find it useful to display the same document in two windows, simultaneously. I
can cut and paste from one window to the other, or read one part of the document
while typing in another, and so on.

Now I have this large LC stack, mostly text, with about 2000 cards. It might be
convenient to have two windows open, both displaying the same stack, so I could
read one card, while typing in another, or cut from one card and paste into
another without navigating back and forth in the usual way.

I suppose there is a way to do this. Can I have a hint, please?

Tim Miller

P.S. I, too, am delighted about the Kickstarter success, and did what I could to
help it along.



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Two Windows

Stephen Barncard-4
In reply to this post by Timothy Miller-2
one can create a copy of Livecode and run each version (name it Livecode B
or something) in a different space, yet cut and paste between.   No name
space conflicts this way!

On Sat, Mar 2, 2013 at 11:29 AM, Timothy Miller <
[hidden email]> wrote:

> Hello,
>
> When working on a long and complex document with a word processor, I
> sometimes find it useful to display the same document in two windows,
> simultaneously. I can cut and paste from one window to the other, or read
> one part of the document while typing in another, and so on.
>
> Now I have this large LC stack, mostly text, with about 2000 cards. It
> might be convenient to have two windows open, both displaying the same
> stack, so I could read one card, while typing in another, or cut from one
> card and paste into another without navigating back and forth in the usual
> way.
>
> I suppose there is a way to do this. Can I have a hint, please?
>
> Tim Miller
>
> P.S. I, too, am delighted about the Kickstarter success, and did what I
> could to help it along.
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



--



Stephen Barncard
San Francisco Ca. USA

more about sqb  <http://www.google.com/profiles/sbarncar>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Two Windows

J. Landman Gay
On 3/2/13 5:59 PM, stephen barncard wrote:
> one can create a copy of Livecode and run each version (name it Livecode B
> or something) in a different space, yet cut and paste between.   No name
> space conflicts this way!

I do that all the time, only my second copy is using the MetaCard IDE. I
keep both open routinely. It works fine. Sometimes I also have LiveCode
5.0.2 running for legacy reasons. And if I'm trying out the latest
pre-release, sometimes I have four copies of the engine running.

It can get iffy if you get them confused.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Two Windows

Timothy Miller-2
On Mar 2, 2013, at 4:19 PM, J. Landman Gay <[hidden email]> wrote:

> On 3/2/13 5:59 PM, stephen barncard wrote:
>> one can create a copy of Livecode and run each version (name it Livecode B
>> or something) in a different space, yet cut and paste between.   No name
>> space conflicts this way!
>
> I do that all the time, only my second copy is using the MetaCard IDE. I keep both open routinely. It works fine. Sometimes I also have LiveCode 5.0.2 running for legacy reasons. And if I'm trying out the latest pre-release, sometimes I have four copies of the engine running.

Thanks for all the suggestions. Sad to say, I'm lost now. (I'm moderately competent in my own occupation, believe it or not. Not this one..)

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 LiveCode.

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?

I'm not sure how I'd save, but I guess I could figure it out by trial and error.

Have I understood correctly?

Tim



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Two Windows

Peter Alcibiades
It sounds like you are using just one desktop on your monitor and that makes it very hard to manage all the overlapping windows.  What's needed is an add-on that gives you multiple virtual desktops - think this is Spaces on Mac, and there is a windows add-on that does it.

Then you open one copy on one desktop, the other saved as, ...1, on the other desktop, and just move between them.  The great advantage is that each desktop remains exactly as you left it, ready to go back to.  Even more useful if you end up running two or more copies of LC itself which some seem to be suggesting.  
Reply | Threaded
Open this post in threaded view
|

Re: Two Windows

David Epstein
In reply to this post by Timothy Miller-2
I think Tim Miller is right to think that opening two copies of  
LiveCode will not help him edit the same stack in two windows, as  
each will not know about the changes in the other until saved to disk  
and reopened, and two very different versions are likely to result--
unless all changes are immediately saved and the other window's stack  
is reopened.

I would suggest rather creating a second stack (perhaps a substack)  
used as a secondary window, to which the content of individual cards  
could be copied as needed.  Write their changes back to the main  
stack before you "navigate" to another card in the secondary window  
by copying new content there.  You'll need to either prevent or  
handle the special case where one card is open in both windows at  
once (you can handle it by, e.g., using a closeField handler or a  
keyDown handler in stack 1 to change the content of field 1 of stack  
2 whenever field 1 of stack 1 is edited).

David Epstein

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Two Windows

pmbrig
In reply to this post by J. Landman Gay
On Mar 2, 2013, at 7:19 PM, J. Landman Gay wrote:

> On 3/2/13 5:59 PM, stephen barncard wrote:
>> one can create a copy of Livecode and run each version (name it Livecode B
>> or something) in a different space, yet cut and paste between.   No name
>> space conflicts this way!
>
> I do that all the time, only my second copy is using the MetaCard IDE. I keep both open routinely. It works fine. Sometimes I also have LiveCode 5.0.2 running for legacy reasons. And if I'm trying out the latest pre-release, sometimes I have four copies of the engine running.
>
> It can get iffy if you get them confused.

Maybe you could put "on resume" and "on suspend" handlers in the frontscripts of each instance to change the title of the topstack -- eg, from "myStack" to "myStack LC 5.0.2"… ?

-- Peter

Peter M. Brigham
[hidden email]
http://home.comcast.net/~pmbrig

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Two Windows

J. Landman Gay
In reply to this post by Timothy Miller-2
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
> LiveCode.

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         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Two Windows

Timothy Miller-2

On Mar 3, 2013, at 10:57 AM, J. Landman Gay <[hidden email]> wrote:
>
> 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.



That's very clear. I get it now.

Thanks also to Peter, Peter and David.

Tim Miller
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode