Please enable JavaScript to view this site.

A-Shell Development History

922.3.1

(Windows/ATE) The border of group boxes has now been adjusted to allow the top and bottom lines within the box to be used. (The first usable row is 2, since row 1 is where the top border is, but the last usable row is equal to the height of the groupbox.) Previously, attempting to do this would cause the top and bottom border of the groupbox to be overwritten.

922.3.2

(Window/ATE) Add control flag MBF'ALTPOS (1048576) for use with buttons that are on the bottom row of a dialog just below a groupbox. This causes the position of the button to be adjust downward slightly, to take advantage of the bottom margin of the dialog box. (Otherwise the buttons will nearly touch the bottom of the groupbox just above them.)

922.3.3

(Windows/ATE) New EVENTWAIT opflags:

EVW'EDIT (128)

EVW'PREV (256)

 

EVW'EDIT causes EVENTWAIT to treat any EDIT, COMBO, or DATE/TIME control (i.e. any INFLD control) that has the MBF'KBD style as "hot", meaning that if you move the focus to it, EVENTWAIT will exit with its keyclick string as if you had clicked on it.

EVW'PREV is like EVW'NEXT, but starts out on the control prior to the one specified in the CTLID parameter. This might be useful for re-entering the EVENTWAIT after an INFLD edit was exited with an up arrow. If you knew the ID of the previous control, you could specify it directly, but if you don't know it, and you do know the ID of the INFLD control, then you can specify it along with the EVW'PREV flag. (Note that you can retrieve the ID of INFLD control, or any other control, using AUI,"CONTROL" opcode 10 and specifying the coordinates. (It returns the ID in the CSTATUS parameter.)

922.3.4

(Windows/ATE) The EVENTWAIT operation has undergone a number of minor improvements. One change that might affect existing programs is that radio buttons with the MBF'KBD style will trigger an exitcode whenever they are set, even if just done via the keyboard arrows. (Previously, the arrows changed the selected button, but didn't trigger an exit from the EVENTWAIT, although clicking on a radio button, or hitting ENTER, would.) The new method makes the keyboard logic match the mouse logic more closely.

922.3.5

(Windows/ATE) XTREE now returns exitcode 10 in response to ^C, regardless of whether CTRLC has been enabled or disabled.

922.0.1

(Windows) CGI mode now works in A-Shell/Windows. As with A-Shell/UNIX, it is designed to work with the HTML METHOD="POST", in which the form variables are passed to the CGI script in stdin. The CGI script (BAT file) should launch A-Shell with a command line similar to this:

@c:\vm\miame\bin\ashw32.exe -cgi -z -e -i c:\vm\miame\miame.ini cgicmd

Where 'cgicmd' is a command file that logs to a valid PPN and executes the program which processes the CGI request. That program should use XCALL CGIUTL calls to retrieve the variables form the form and output a new form to stdout. The program should then exit to the dot prompt (where the instance will be terminated automatically).

Note the need for the -cgi, -e, and -z switches. (The -z switch is only needed for A-Shell/Windows CGI, and causes the window to be invisible, which is not only appropriate since no one can see it anyway, but possibly mandatory, since the attempt to generate a window may generate an error on the web server.) The -cgi and -e switches are also used with the UNIX implementation of CGI.

Some minor differences to note between the Windows and UNIX implementations of CGI:

Under Windows, PRINT statements are not automatically send to stderr; instead, they are thrown away with all other screen output due to the -z switch. (If you were using PRINT statements to debug your code, you'll have to change them to statements that output messages to a file.)
The directories and privilege rules for launching CGI scripts under Windows may differ from those for UNIX, especially if you use the IIS web server instead of Apache.
Precede the command in the BAT file with a @ to prevent it from echoing. (At best, echoing will cause the command line to appear at the start of the resulting web page; at worst it will cause the resulting web page to abort.)

One way to test whether your Basic program and A-Shell are performing properly is to create a file that contains the expected stdin string, then just open a Command Prompt window and execute a command line which launches A-Shell with the redirected stdin file, and redirects output to another file. You can then examine the output file to see if it looks like a valid web page.

For testing purposes, stdin format input format can be simplified to a list of "VARNAME=value&" pairs, e.g.

NAME=Bertrand Russsel&GAME=philosophy&

(The above example simulates a form with two variables, NAME and GAME.) Assuming this meets the requirements of your CGI program, and you stored it in a file called cgitst.in, you could test it with something like the following:

c:\vm\miame\bin\ashw32.exe -z -cgi -i c:\vm\miame\miame.ini

    cgicmd < ./cgitst.in > ./cgitst.out

 

The command is shown on two lines above but should be entered in the Command Prompt window as a single, letting it wrap as needed. Naturally you would adjust the paths, cmdfile name, and names of the input and output files as per your situation. If the process works, you should see no action whatsoever, but when you TYPE the the cgitst.out file you should see a valid web page. (Better yet, try to load it with a browser to verify that it is in a valid format.) If this test works, then the only remaining issues would relate to the configuration of the web server.

Search for "CGI" in the A-Shell Development Guide and read the topic on using A-Shell/UNIX as a CGI Engine for a working example of a form and CGI program, as well as some general tips. Also see CGIUTL.SBR in the XCALL Reference.

Using a default 'typical' installation of Apache 2.0 under Windows XP, I was able to implement the example form and CGI script from the A-Shell Development Guide with only the following changes:

Add "ExecCGI" to the Options line in httpd.conf:

Options Indexes FollowSymLinks ExecCGI

Add ".bat" to the name of the script in the FORM ACTION line of the form:

<FORM ACTION="/cgi-bin/cgitst.bat" METHOD="POST">

My cgitst.bat script was placed in the cgi-bin directory of Apache, and contained the following (all on one line):

@c:\vm\miame\vc49\release\ashw32.exe -cgi -z -e -i

    c:\vm\miame\miame.ini tstcgi

 

922.0.2

Fix a problem with the INFLD non-GUI mode failing to output spaces as needed to clear a previously formatted version of the field. For example, a date field will expand by 2 characters when redisplayed, but when re-edited, those extra 2 characters should be blanked out so as to not confuse the operator. This was broken during the implementation of the GUI version of A-Shell (where the blanking logic doesn't apply).

922.0.3

(ATE) Commands to change the number of rows and columns (such as TAB(-5,x) and TAB(-6,x), or SET TERM HEIGHT x and SET TERM WIDTH x) were affecting the ATE window, but were not updating the internal screen status on the server side. This was causing a variety of problems when using non-standard numbers of rows and columns.

922.0.4

(WINDOWS/ATE) AUI "EVENTWAIT" now supports a timeout parameter:

xcall AUI,"EVENTWAIT", parid, ctlid, exitcode {,opflags {,timer}}

If specified, and non-zero, the operation will time out in the specified number of milliseconds, returning EXITCODE 11 (like INFLD).