Re: Arrow keys and 4GL
Posted in 1991
Quoting Lista Usuarios Informix... > > We need to recognize in a 4GL program which arrow key (left, right, > up or down) the user pushed. > Do you know some way to do it? > Thanks. > In Informix-4GL 4.10 there will be two new functions that will help you with this problem... fgl_lastkey() returns an INTEGER code for the last key a user hit. fgl_keyval() returns an INTEGER code representing a key value. ex. IF fgl_lastkey() = fgl_keyval("LEFT") THEN ... For those of you who can't wait for 4.10 of 4GL, I have reversed engineered those two functions (plus others... fgl_getenv(), fgl_getkey, etc.). They will be available in db4glgen-2.1 available probably this weekend. Those of you have who have been keeping up with db4glgen are probably saying, "1.6 to 2.1... what happened to 2.0 ?" Well 2.0 was done last week, but because the changes for 2.1 went much faster than expected, I figured I'd skip releasing 2.0. DB4GLGEN-2.1 features... Bug fixes: * In the del_tabname routine, if the DELETE failed the cursor would not get closed. * In the upd_tabname routine, if the UPDATE failed the cursor would not get closed. Requested feature: * The -f option will force over-writing generated code. This used to be the default, now the default is to not over-write generated code. fgl_getkey() This function will get a single key stroke from the keyboard. SOS: fgl_prtscr() - formerly dbprtscr() (consistancy w/ function names you know) This function will print the screen including windows. Reverse engineered functions: fgl_getenv() This function returns a value for an environment variable. fgl_lastkey() This function returns the value of the last key pressed. fgl_keyval() This function returns the numeric value of a key name. There is more, but I don't want to spoil any surprises :-) DAS -- David A. Snyder @ UE&C - Catalytic in Philadelphia, PA UUCP: ..!uunet!trac2000!das INTERNET: das@trac2000.ueci.com