Guidance
指路人
g.yi.org
Upload / Forum Attachment / Reginald Rexx Programming Language Compiler User Forum Attachments and Pictures / 13308-guisay_problem.rex

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
/*
GUIBEGIN


WINDOW , 347, 108, 431, 41, POPUP|CAPTION|SYSMENU|THICK, , Specify the LRECL of the file
	FONT 8, 400, MS Shell Dlg
	TEXT 13, 16, 360, 8, GROUP, , filename_text, , Filename
	ENTRY 384, 14, 32, 12, H_AUTO|BORDER|TABSTOP, CLIENTEDGE, lrecl_entry
	PUSH 384, 29, 40, 9, DEFAULT|HIDE|TABSTOP, , ok_button, , OK
DEND
GUIEND
*/

LIBRARY rexxgui
guierr = "SYNTAX"
guiheading = 1

DO nr_loops = 1 TO 2
	rc = guisay("Press enter rather than clicking on the OK button to see the error")
	filename = "c:\any filename\anywhere"
	lrecl = get_lrecl(filename)
END	

RETURN 0

/*********************************************************

*********************************************************/
get_lrecl:
PROCEDURE EXPOSE lrecl_entry
ARG filename
guicreatewindow('NORMAL')
guiaddctltext('filename_text', filename)
lrecl_entry = "10"
guiaddctltext('lrecl_entry', lrecl_entry)

again:
DO FOREVER
	guigetmsg()
	IF EXISTS('GuiObject') == 0 THEN DO
		IF EXISTS('GuiSignal') THEN DO
		END
	END
	CATCH SYNTAX
			CONDITION()
			SIGNAL again
	CATCH HALT
	FINALLY
		guidestroywindow()
END
RETURN 0
/*************************************************************
 Clicked the hidden OK button
*************************************************************/ 
wm_click_ok_button:
guigetctlvalue('lrecl_entry')
SELECT
	WHEN 0 = DATATYPE(lrecl_entry, "W") THEN
		rc = wdwsay.rex("Not a valid LRECL", "STOP|")
	WHEN lrecl_entry < 2 THEN
		rc = wdwsay.rex("Enter a valid LRECL (2 or more)", "STOP|")
	OTHERWISE
		DO
			guisendmsg(,'POST CLOSE') 
		END	
END		

RETURN
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Sat 2024-10-12  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2010-04-14 21:09:44