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

K Frame Dialog Boxes



The opening of the XYWWWEB site and the continuing presence of this
mailing list have proved to be very inspirational to me since I stumbled
upon them last month. I have discovered that TTG still exists, obtained
a more reliable version of XYWIN, and found lots of documentation,
albeit fragmentary, on XPL programming and XY customization. In turn, I
have attacked some old XY customization issues with renewed energy. I
recently re-wrote my personal envelope routines, for example, and for
that project attempted to create a series of custom dialog boxes. On the
one hand, it's fun and rewarding, but on the other hand it's maddening,
given the difficulty of dealing with a programming 'language' which
involves the direct manipulation of obscure tokens, and the incomplete
documentation.

I am particularly stumped by a couple of aspects of XY dialog boxes,
specifically in XY jargon: type K frames loaded in a U2 file and called
with the JM command. Constructing the boxes is reasonably
straightforward once the bizzare positional syntax and character-based
coordinate system is mastered. Even program execution is reasonably
straightforward, as long as you launch a simple XPL sequence based on
the push of a button, which is billed as the standard way to 'begin or
apply an action.' I'm getting into trouble trying to use something a
little more fancy and woefully under documented: using commands to read
strings from a standard windows INI file.

The general topic is covered in a document called DIAL.DOC in a
collection of unpublished material I downloaded from the XYWWWeb site.
Typically, to deal with a new area, the XPL gang took some existing XPL
functions and variables, and extended them, as described in WPROF.DOC in
the aforementioned collection.

I've built a small INI file which contains the filenames and
descriptions of various envelope templates. I want to have a dialog box
which reads the INI file, lists the files by description, and places the
actual file name into a text box where my executable code can get at it
using the ID number of the text box. Generating the list box is easy,
thanks to the custom ?WS list. There is a companion function which
depends on an adaptation of the $WP variable. As is, $WP returns the
default [windows] printer device. If you specify the correct argument
list, however, $WS can actually read an INI file. For example,
≪VA$WS,xwenv.ini,laser,Laser envelope, no return, current font≫ will
return the filename from an entry in an INI file named XWENV.INI, with a
section which looks like this:

	[laser]
	.
	Laser envelope, no return, current font=la_10_cf.env
	.
	
As WPROF.DOC states: "you can use the ?WS feature to build a list of
items in a dialog box, and then use the ≪VA$WP≫ to extract the string
from a given keyword.

By implication, since any selection made from a ?WS list box is dynamic,
one should be able to code in the ≪VA$WP,xwenv.ini,laser,%102≫ as the
contents of a text box and have it automatically update as the selection
from a list box with ID 102 changes. But it doesn't work. If I
substitute a literal value for the %102 then I get the appropriate
string returned, as below:

CMd*	102	+	+1	35	10	?WSxwenv.ini,Laser
tc	110	+	+2	35	1	≪VA$WP,xwenv.ini,Laser,Laser envelope, no return,
current font≫

But if I change this to

CMd*	102	+	+1	35	10	?WSxwenv.ini,Laser
tc	110	+	+2	35	1	≪VA$WP,xwenv.ini,Laser,%102≫

then the TC control reads (none), which seems to imply that the syntax
is working but the variable %102 isn't being resolved correctly. Also,
I can get a linked text box to read the selection from the list box
dynamically, I just can't read the key.

I've gotten around this problem by reversing the entries in the INI
file, and so the list box contains the actual file names, rather than a
description, and my XPL program can indeed grab the filename with the
%102 reference, but I'd like to get the whole deal to work as designed.

I'd previously tried to do this with radio buttons. I won't even
describe how painful it was to try to get a text box to update based on
the selected button, but actually this INI file method is more flexible,
since I won't have to redesign the dialog box each time I add or delete
an envelope template.

If anyone out there knows something about these dialog box issues and
can help, I'd certainly appreciate it. And while I'm asking for help,
RJH's suggestion about using the 8515OEM.FON file to improve the
readability of draft mode doesn't seem to work on any of the WIN95
machines to which I have access. It works under WIN31, but WIN95 doesn't
seem to use the fonts listed in the system.ini file. I think it's using
the ROM fonts from the video card. Anyway, if anyone has any tips for
changing the draft font under WIN95, please let me know.

Thanks in advance.

Richard Minutillo
rgm@xxxxxxxx