ADDRESS null
OPTIONS 'TRAP'
SIGNAL ON HALT
SIGNAL ON SYNTAX
SIGNAL ON ERROR
CALL RXERR('ERROR|DISPLAY')
rxtype.1 = 'MENU'
rxlabel.1 = 'MENU'
rxflags.1 = ''
menu.0 = 'Items'
menu.1 = 'My Item|10'
menu.2 = ''
menu.1.1 = '|10'
rxtype.2 = 'ENTRY'
rxflags.2 = 'REPORT'
rxlabel.2 = 'Menu text:|'
rxpos.2 = '-1 5 5 150'
rxval.2 = 'TEXT'
text.1 = ''
rx = ''
CALL RXCREATE('RX', 2, 'Main Window', 'NOCLOSE')
items = 0
DO FOREVER
CALL RXMSG()
IF rxid == '' THEN SIGNAL HALT
IF rxid == '2' & items < 10 THEN DO
items = items + 1
CALL RXSET(, 'ADD', text.1, 1, '1.1.' || items)
END
IF rxid == '1' THEN CALL RXSAY('Selected menu item: ' || rxsubid)
END
syntax:
CALL RXSAY(CONDITION('D') || '0D0A0D0A'x || SOURCELINE(sigl),,'Error '||condition('E')||' at line '||sigl)
halt:
error:
CALL RXMSG(,'END')
EXIT
|