next up previous contents
Next: Improvements in Common Up: Changes in Specific Previous: Macintosh Changes and

Changes in the Microsoft Windows Version

The new standard version for Microsoft Windows now requires at least a 386 processor and Windows version 3.1. This version is still based on 16 bit windows and hence still has the same limitations on vector sizes as previous versions. In addition, a Win32 version is now available that removes some of these limitation.

In line with the use on Windows 3.1 as the base, accelerators for the edit menu items in WXLS and in LSPEDIT have changed to the ones used in the 3.1 accessories Write and Notepad: Ctrl-X for Cut, Ctrl-C for Copy, etc.. The interrupt key combination is now Ctrl-Break. The functions open-file-dialog  and set-file-dialog  now use the new standard Windows open and save dialogs and also optionally set the working directory to the directory containing the selected file.

The listener has been modified so that is can now hold a more reasonable amount of text and should no longer run out of memory.

Modeless dialogs, such as slider dialogs, are now MDI clients rather that popup windows.

The need to set environment variables has been eliminated. Instead, information about the location of startup files can now be placed in a private initialization file, wxls.ini for the 16-bit version and wxls32.ini for the 32-bit version, in the Windows system directory. This file can contain several variables in sections [Xlisp], [Listener], and [Graphics]:

The Libdir variable should be set to the directory containing the executable and runtime files; this should be done at installation time by loading config.lsp. The Workspace variable allows an alternate initial workspace to be specified. Both can be overridden on the command line by specifying -d or -w options, respectively. The Color variable can be used to turn color use off if allocating a color background buffer would require too much memory. As an example, a wxls.ini file containing

[Xlisp]
Libdir=C:\WXLS
[Listener]
Font="Courier New Bold"
FontSize=13
[Graphics]
Color=off
specifies a library directory, a listener font, and turns color off.

The initial workspace and the default directory can also be specified on the commandline as -w file.wks and -d dir, respectively.

A very minimal DDE interface is provided. The interface is very simple and based on DDEML. As a server, WXLS allows to connections to the topic XLISP-STAT under the service name XLISP-STAT. It accepts two kinds of transactions:

As a client, there are three functions you can use that correspond fairly closely to their DDEML equivalents: dde-connect , dde-disconnect , and dde-client-transaction .

dde-connect  takes two arguments, strings naming a service and a topic. The topic string is optional; it defaults to the service string. The return value is a descriptor of the conversation if the connection is established, otherwise it is nil . At the moment conversation descriptors are integer indices into a table, and the number of concurrent conversation is limited to 30. This may change.

dde-disconnect  takes a conversation descriptor and attempts to close the conversation. If successful it returns t , otherwise nil . If dde-disconnect is called with no arguments then all currently active conversations are terminated. In this case the return value is t if any are terminated, nil if not.

dde-client-transaction  requires a conversation descriptor as its first argument. The remaining arguments are keyword arguments:

:type : should be :request  or :execute ; default is :execute .
:data : a string, currently only used by execute transactions.
:item : an item name string, currently only used by request transactions.
:timeout : a positive integer specifying the timeout in milliseconds. The default is 60000.

The return value is t if the transaction is successful, nil if not.

As an example, you could have WXLS communicate with WXLS by DDE (why you would want to I do not know, but it works):

> (dde-connect "xlisp-stat")
0
> (dde-client-transaction 0 :data "(+ 1 2)")
T
> (dde-client-transaction 0 :type :request :item "value")
"3"
> (dde-disconnect 0)
T
You can also communicate with the program manager:
> (dde-connect "progman")
0
> (dde-client-transaction 0 :data "[ShowGroup(Main,1)]")
T
> (dde-client-transaction 0 :type :request :item "Groups")
"Main\r
Accessories\r
Applications\r
Microsoft C/C++ 7.0\r
Software Development Kit 3.1\r
Win32 Applications\r
Adobe\r
Borland C++ 4.0 Online Books\r
Borland C++ 4.0\r
StartUp\r
Games\r
Borland C++ 3.1\r
Pocket Tools\r
XLISP-STAT Programs\r
"
> (dde-disconnect 0)
T
The first transaction is an execute transaction that opens the Main group's window. The second is a request that obtains a list of the current groups.
This DDE interface is experimental and may change. For the moment it seems adequate for providing configuring the integration of WXLS into Windows during setup.

The functions msw-get-profile-string  and msw-write-profile-string  can be used to access and modify user preference information. They require three and four arguments, respectively. The first and second arguments specify the section and item names as strings, and the last argument specifies the preference file name. A preference file name of nil refers to the system preference file. For msw-write-profile-string  the third argument is a new value. This can be a string or nil ; if it is nil , the entry is deleted. This function deletes a section if the item argument is nil .

The function msw-win-exec  is a synonym for the system  function. On failure it now returns two values: nil and a numerical error code. The msw-win-help  function has been modified to use keyword symbols to identify help request types.

Both 16-bit and 32-bit versions can use DLL's, but only 16-bit and 32-bit DLL's, respectively.



next up previous contents
Next: Improvements in Common Up: Changes in Specific Previous: Macintosh Changes and



Luke Tierney
Wed Feb 26 05:25:18 CST 1997