home *** CD-ROM | disk | FTP | other *** search
- /* */
-
- /* Get a ReqDef structure */
- rq = rxi_GetReq()
- IF rq == '' | rq == 0 THEN SAY 'ReqDef allocation error'
-
- /* Let's set up a list for this ReqDef with a few strings. I'll use variables */
- /* in some of the calls to AddReq so that you can see what's acceptable. */
- reqs = rxi_AddReq(rq,1,'string 1')
- IF reqs == 0 THEN SAY "Out of memory"
-
- string = 'string 2'
- reqs = rxi_AddReq(rq,2,string)
- IF reqs == 0 THEN SAY "Out of memory"
-
- thirdID = 3
- reqs = rxi_AddReq(rq,thirdID,'string 3')
- IF reqs == 0 THEN SAY "Out of memory"
-
- /* Display that list of strings for the user to do the selection. Note STRING_MODE flag */
- string = rxi_ReqWindow(rq,'Select One',32768,,,'Initial String',,,0)
- IF string == '' THEN SAY "Canceled"
- SAY string
-
- /* Display that list again. This time not that the GadgMask arg is set up to */
- /* remove the Name gadget. */
- string = rxi_ReqWindow(rq,'Select One',32768,8,,'Initial String',,,0)
- SAY string
-
- /* Display that list again. This time, set ADD_ME, and also add the DELETE */
- /* gadget. */
- string = rxi_ReqWindow(rq,'Select One',32768+1,32768,,,,,0)
- SAY string
-
- /* Display that list again. If on the previous call, you typed a string into */
- /* the Name gadget that wasn't in the list, or used the DELETE gadget, you */
- /* should see the results. */
- string = rxi_ReqWindow(rq,'Select One',32768+1,32768,,,,,0)
- SAY string
-
- /* Now free the ReqDef */
- rq = rxi_EndReq(rq)
-