[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Two or more Xys open



** Reply to message from Harry Binswanger  on Fri, 28 Oct 2005
00:54:17 -0400


> This could
> benefit from having 3 Xy iterations open (remember, I have dual monitors,
> so I have room for this.

You can have 3 iterations, or you can have 13 -- as many as you want -- if it
serves a purpose. I've tested up to 9 or 10 or so, and it works fine. An edit
in *any* one of them is reflected in all the others.

> What would help in my particular work is if I could use ctrl= and ctrl+
> between two different Xy iterations. That way, I could more easily see
> where my formulations in one version of the essay differ from those in the
> other (since the two versions--and we're talking two different files
> here--are basically the same). Is that feasible?

Of course. Easy. GoXy.EXE is, above all, a task switcher. You just write a
macro that switches between the Window Titles of the two iterations ("if I'm in
Window 2, switch to Window 1; if I'm in 1, switch to 2"). DUO uses four
extended Save/Gets: 703, to keep track of the current highest iteration number
among all iterations ("4", let's say); 704, the number of the current iteration
(e.g. "2", which is the basis of its unique Window Title, "Xy Write2"); 705,
(for internal purposes) the fully-qualified d:\path\filename of your INTfile
(e.g. D:\XY4\STARTUP.INT); 706, the window number (hWnd) for the session.
Because each iteration knows its own unique iteration number, your macro would
be a brief affair:

BX sa/nvQ2 BX waitQ2 BX duo/rQ2 ;*; Save current iteration, then synchronize
 all iterations (DUO with the "R"efresh switch)
-2)+1>;*; Pithily toggles "1" to "2", or "2" to "1"
BX dos/nv/x/z /c kmd/c start /min GoXy.EXE "Xy Write"Q2 ;*; Toggle
 between iterations 1 and 2. Done!

Remember, all iterations are using the same XyWrite configuration (same
keyboard, same U2, same STARTUP.INT, same everything), so they will function
identically.

> Can Xy 1 compare its
> contents to what's open in Xy 2?

You're getting confused. Comparison of two *different* files is NOT the
purpose! Moreover, how are you going to compare two different files in two
different sessions of DOS? You're not going to be able to write a DOS or XPL
script that can do that. Comparisons are ordinarily performed in the same
memory space. If you just want to be able to see two different files
simultaneously in separate windows, you can do that now, without DUO: launch
two iterations of XyWrite.

However, if you wanted to make a third, "integrated" file, comprised of the
best statements drawn from two different source files, you could open that
third file in each of two DUO iterations (and in a third DUO iteration, so that
you could see all three, the two sources plus the integrated text,
simultaneously), and keep them synchronized easily; but you're still going to
have to manually DeFine and CoPy text from the two source files into the third
integrated file. No way around that.

> I suppose I could write a non-Xy, DOS
> program to do the comparisons and shell out to DOS in Xy 1 to execute it.
> But could it be done in XPL w/o shelling to DOS?

I don't understand how that would work. Sounds impossible. But what might be
fruitful to do would be to open the two different files in both iterations, and
perform the COMP (actually, the FD/FM) in both iterations, *with this
difference*: Xy1 would focus on Document1, while Xy2 would focus on Document2.
Then, if you perform a simultaneous compare in both iterations, they will both
stop in the same spot, except that one iteration will show Document1, while the
other iteration will display Document2 -- you can see right away what the
actual difference is! That's vaguely interesting. With a little XPL, you
could easily make GoXy launch the compare in both iterations with a single
keystroke -- GoXy is very adept at finding any iteration of XyWrite and then
poking keystrokes into XyWrite's keyboard buffer. If you want to get a
barebones sense of what GoXy can do, download it and skim Go.TXT:
 http://users.datarealm.com/xywwweb/Go.ZIP

> I don't see how the XPL
> code in one Xy could "know about" what's going on in another Xy iteration.

It can't. It doesn't. But when the various iterations are synchronized, i.e.
identical, what you do in one session applies equally in any other. That's why
DUO works. And it does work -- like magic! Although I don't think you can
make it work in Win9x, due to the absurd inconstancy of 9x Window Titles when a
console process is launched with the START command rather than a PIF (shell to
any EXE as a child process, and the Window Title changes to the name of the
child process -- and *stays* changed, even after the shell terminates! you
need the memory of an elephant to keep track of M$ OpSys quirks)...