Trying to capture RETURN
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
I'm working on a 4gl input statement which needs to be able to capture a RETURN (CONTROL-M) keystroke before it leaves the field. The client is version 9, server is version 5. The Manual supplement for version 4.1 claims that an ON KEY (CONTROL-M) statement will prevent the user from using RETURN to leave the field, but this seems not to be the case with version 9. The AFTER FIELD clause seems to be checked before any of the ON KEY clauses, and fires before the ON KEY clause gets checked. As an alternative, I was thinking of writing a generic input routine for the field, but I need a way of positioning the cursor either in a field or at a given position. Are there any existing functions that have this capability?
Hello, you can compare: if fgl_lastkey() = fgl_keyval("return") you can put other name-keys in fgl_keyval like F3, down, etc. Dan Bourgeois wrote: > I'm working on a 4gl input statement which needs to be able to > capture a RETURN (CONTROL-M) keystroke before it leaves the field. > > The client is version 9, server is version 5. > > The Manual supplement for version 4.1 claims that an ON KEY (CONTROL-M) > statement will prevent the user from using RETURN to leave the field, > but this seems not to be the case with version 9. The AFTER FIELD > clause seems to be checked before any of the ON KEY clauses, and fires > before the ON KEY clause gets checked. > > As an alternative, I was thinking of writing a generic input routine for > the field, but I need a way of positioning the cursor either in a field > or at a given position. Are there any existing functions that have this > capability? -- ------------------------------------------------------------------------ Gabinet Informàtic i Consultors Departament de Programació Josep M. Martí