36 lines
1.2 KiB
Plaintext
36 lines
1.2 KiB
Plaintext
SUBROUTINE LISTBOX_CONFIG_VALID(ConvType, DataIo, SubrLabel, ReturnedValue)
|
|
*
|
|
|
|
$insert logical
|
|
$insert listbox_config_equ
|
|
$insert msg_equates
|
|
declare function msg
|
|
|
|
equ valid$ to 0 ;* successful
|
|
equ invalid_msg$ to 1 ;* bad data - print error message window
|
|
equ invalid_conv$ to 2 ;* bad conversion - " "
|
|
equ invalid_nomsg$ to 3 ;* bad but do not print the error message window
|
|
|
|
status() = Valid$
|
|
begin case
|
|
case ConvType = 'ICONV'
|
|
ValidChoices = xlate( 'LISTBOX_CONFIG', SubrLabel, listbox_config_choices$, 'X' )
|
|
IF SubrLabel = 'POSTCLEANCODE' THEN
|
|
ValidChoices := @VM:'FAB2':@VM:'FAB11'
|
|
END
|
|
locate DataIo in ValidChoices using @vm setting Fpos then
|
|
ReturnedValue = DataIo
|
|
end else
|
|
MsgInfo = ''
|
|
MsgInfo<mtext$> = DataIo:' is not a valid choice. Please choose from the drop down, or Edit Options [SF2].'
|
|
MsgInfo<micon$> = '!'
|
|
Void = msg( '', MsgInfo )
|
|
status() = invalid_nomsg$
|
|
end
|
|
case ConvType = 'OCONV'
|
|
ReturnedValue = DataIo
|
|
case otherwise$
|
|
status() = invalid_msg$
|
|
end case
|
|
return
|