1. Re: onKeyPress[Screen]
- Posted by DanMoyer at PRODIGY.NET Aug 03, 2001
- 418 views
Derek, This approach might be pretty obvious to you and probably others too, but I'm glad you mentioned it, 'cause I think it's a real neat way to simplify and help maintain programs! Dan ----- Original Message ----- From: "Derek Parnell" <ddparnell at bigpond.com> To: "EUforum" <EUforum at topica.com> Subject: Re: onKeyPress[Screen] > > Hi George, > > > Well when this job is done I would hope to move some of my existing > > customers over to the window's product...without a great deal of burden..I > > agree that I certainly won't violate standard windows UI, but hidden > behind > > the system it would be nice for current users of my software to have some > > familiar controls without losing the windows UI. I may abandon this at > some > > point if it becomes to troublesome. This is what I have done at present .. > > Fair enough. I've reqorked your code to show you another style which may > help future maintenance etc... > > --------------------- key press routines ------------------- > constant keyRtns = { > routine_id("processExit"), > routine_id("processNext"), > routine_id("processPrev"), > routine_id("processFind"), > routine_id("processAdd"), > routine_id("processSettab"), > routine_id("processChange"), > routine_id("processDelete"), > routine_id("processSave"), > routine_id("processAbort")} > constant keyCodes = "XNPFASCDVB" > procedure keyPressProcess(integer keyCode,integer shift) > if mode = 0 then > keyCode = find(upper(keyCode), keyCodes) > if keyCode != 0 then > call_proc(keyRtns[keyCode]) > end if > end if > end procedure > ---------- > cheers, > Derek. > > > > >