ADDRESS null
OPTIONS 'TRAP'
SIGNAL ON HALT
SIGNAL ON SYNTAX
SIGNAL ON ERROR
CALL RXERR('ERROR|DISPLAY')
rxtype.1 = 'ENTRY'
rxflags.1 = 'REPORT'
rxlabel.1 = 'Label|Second||Fourth|All'
rxval.1 = 'TEXT'
rxpos.1 = '2 10 20 45'
text.1 = 'Hello'
text.2 = 'Hi'
text.3 = ''
text.4 = 'More text'
rx = ''
CALL RXCREATE('Rx', 1, 'Main Window', 'SIZE|NOCLOSE')
rx2type.1 = 'CHECK'
rx2flags.1 = 'REPORT'
rx2label.1 = 'One|Two|Three|Four|Choices'
rx2val.1 = ''
rx2pos.1 = '2 7 20'
rx2 = ''
CALL RXCREATE('Rx2', 1, 'Checkmarks', 'NOCLOSE|MIN|RESULT|CHILD')
rx3type.1 = 'SPIN'
rx3flags.1 = 'REPORT'
rx3label.1 = 'Range 1:|Range 2:|Try us'
rx3val.1 = '64 19'
rx3info.1 = '0 255 10 20'
rx3pos.1 = '1 10 20 70'
rx3 = ''
CALL RXCREATE('Rx3', 1, 'Spin Me', 'NOCLOSE|SIZE|CHILD')
rx4type.1 = 'PUSH'
rx4flags.1 = 'BOOL|RESULT'
rx4label.1 = 'No|Yes|'
rx4val.1 = ''
rx4pos.1 = '-1 3 3'
rx4 = ''
CALL RXCREATE('Rx4', 1, 'Understand?', 'NOCLOSE|RESULT|CHILD')
DO FOREVER
CALL RXMSG()
IF rxid == '' THEN DO
CALL RXSAY('"'||rxwind||'" closed.')
END
ELSE DO
IF rxid == 0 & rxsubid == 'ENTER' THEN DO
CALL RXSAY('Pressed ENTER on "'||rxwind||'".')
END
ELSE CALL RXSAY('Group #'||rxid||', Control #'||rxsubid||' ended "'||rxwind||'" window.')
SELECT
WHEN rxwind = "RX3" THEN DO
DO i = 1 TO 2
CALL RXQUERY(rxwind, , 'KNOB', 1, i)
CALL RXSAY('Spin Me Group 1, Knob #'||i||' = '||knob)
END
END
WHEN rxwind = "RX2" THEN DO
IF rxid > 0 THEN DO
IF rx2val.1 == '1' THEN CALL RXSAY('Checkmark is On')
ELSE CALL RXSAY('Checkmark is Off')
END
END
WHEN rxwind = "RX4" THEN DO
i = 'NO'
IF rxsubid THEN i = 'YES'
CALL RXSAY('Understand? Group 1, result is '||i)
END
WHEN rxwind = 'RX' THEN DO
IF rxid > 0 THEN DO
CALL RXSAY('Entered text is "'||text.rxsubid||'"')
END
END
END
END
CALL RXMSG(rxwind, 'END')
IF rxwind = 'RX' THEN SIGNAL HALT
END
syntax:
CALL RXSAY(CONDITION('D') || '0D0A0D0A'x || SOURCELINE(sigl),,'Error '||condition('E')||' at line '||sigl)
halt:
error:
CALL RXMSG(,'END')
EXIT
|