SIGNAL ON ERROR
CALL RXERR('ERROR|DISPLAY')
rx1 = ''
rx1type.1 = 'TREE'
rx1flags.1 = 'LINES|BUTTONS|ROOTLINES|REPORT'
rx1label.1 = '|'
rx1val.1 = 'TREE'
rx1pos.1 = '1 10 20 150 10'
tree.1 = ''
tree.0 = ''
rx1type.2 = 'TEXT'
rx1flags.2 = 'NOBORDER'
rx1label.2 = '|'
rx1pos.2 = '1 8 1 250'
rx1type.3 = 'PUSH'
rx1flags.3 = 'REPORT'
rx1label.3 = 'Add Root|Add item|Edit Label|'
rx1pos.3 = '1 170 20 0'
CALL RXCREATE('Rx1', 3, 'RXSET() ADD - TREE', 'NOCLOSE')
DO FOREVER
CALL RXMSG()
IF rxid == '' THEN EXIT
IF rxid == 1 THEN CALL RXSET(, 'VALUE', tree.0, 2, 1)
IF rxid == 3 & rxsubid == 1 THEN DO
line = getlabel('Enter label')
IF line \== '' THEN CALL RXSET(, 'ADD', line || '|-1', 1, 1)
CALL RXQUERY(, 'VALUE', 'position', 1, 1)
CALL RXSET(, 'VALUE', position.0, 2, 1)
END
IF rxid == 3 & rxsubid == 2 THEN DO
CALL RXQUERY(, 'VALUE', 'position', 1, 1)
IF position.0 \== '' THEN DO
line = getlabel('Enter label')
IF line \== '' THEN CALL RXSET(, 'ADD', line || '|' || position.0 || '.-1', 1, 1)
CALL RXQUERY(, 'VALUE', 'position', 1, 1)
CALL RXSET(, 'VALUE', position.0, 2, 1)
END
END
IF rxid == 3 & rxsubid == 3 THEN DO
CALL RXQUERY(, 'VALUE', 'position', 1, 1)
IF position.0 \== '' THEN DO
line = getlabel('Enter label')
IF line \== '' THEN CALL RXSET(, 'ADD', line || '|' || position.0, 1, 1)
END
END
END
syntax:
CALL RXSAY(CONDITION('D') || '0D0A0D0A'x || SOURCELINE(sigl),,'Error '||condition('E')||' at line '||sigl)
halt:
error:
CALL RXMSG(,'END')
EXIT
getlabel:
rxl = ''
rxltype.1 = 'ENTRY'
rxllabel.1 = '|'
IF ARG() \= 0 THEN rxllabel.1 = ARG(1) || ':|'
rxlpos.1 = '1 8 8 80'
rxlflags.1 = 'REPORT'
rxlval.1 = 'TEXT'
text.1 = ''
CALL RXCREATE('RXL', 1, rxllabel.1)
CALL RXMSG()
RETURN text.1
|
|