Amos Professional Manual  Contents  Index

Advanced Control Panels


Interface programs are terminated and removed from memory immediately. If the Interface programs contain an SA command, the original background areas will be neatly pasted back onto the display.

Any active channel can be shut down with this command, by specifying a channel number. If the channel number is omitted, all of the current Interface channels will be de-activated. Please see the DIALOG FREEZE Command below, for something a little less drastic!

EDIALOG
function: find an error in an Interface program
position=Edialog

Whenever an error occurs in an Interface program, its position can be found with a quick call to the EDIALOG function. The relevant section of the Interface string will be displayed on screen, enabling you to discover what has gone wrong. In practice, the most common mistakes are caused by missing or wrongly-used semi-colon characters!

Here is a small error handler that may be useful if included in your own programs:

X> On ErrOr Goto TRAP: Rem Add this line before a DIALOG OPEN command
   ...: Rem The rest of your program goes here
   TRAP: Print Mid$(DB$,Edialog,80) : Wait Key : End : Rem Error handler
Testing an active zone

DIALOG function: return status of an open dialogue box
button=Dialog(channel number)

This function provides a simple method of testing whether or not an option from a control panel has been selected. Simply specify the number of the open channel that is to be tested.

After this function has been performed, one of the following values for the tested button will be returned:

<0 A negative value means that the current channel is inactive, either because it has not been
   assigned to a dialogue box, or because the user has left the box via an exit button.
=0 A value of zero indicates that there has been no user-input since the previous test.
>0 If a positive value is returned, it indicates the number of the last button that was selected by
   the user. In the case of edit zones, a value will only be returned when the [Return] key is
   pressed.

Once the value of the contents held by the DIALOG function has been checked, it will be re-set to zero.

Back    Next
09.03.03