Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- GetIt Reference Guide - syntax: n_newfld(<procedurec>) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Syntax: N_NEWFLD(<procedureC>)

Calls user-defined procedure when cursor moves to new `GET' field.

Example

* Create pop-up help for each field
* descriptive text displays on line 24 each time
* cursor moves to field
DECLARE Ahelp[2]                        && array of help text
Ahelp[1] = "Enter last name"            && one entry per GET field
Ahelp[2] = "Enter first name"
@ 1,0 SAY "Last  name:" GET Mlname
@ 2,0 SAY "First name:" GET Mfname
N_NEWFLD("Fieldhelp")
READ
N_NEWFLD("")
  ...
  ...
* Called each time cursor moves to new field
PROCEDURE Fieldhelp
Mattr = N_SAVEATTR()               && save screen attributes
@ 24,0 SAY Ahelp[N_GETNO()]        && display help text from array
N_RESTATTR(Mattr)                  && restore screen attributes
RETURN

Notes

While N_NEWFLD is active, the Event Procedure is called whenever the cursor
moves into a new input field (unlike a VALID function which is called when
the cursor leaves a field).  N_NEWFLD is active only during a READ.

N_NEWFLD("") with a null string disables N_NEWFLD interrupts.

5.0: N_NEWFLD will erase any other preBlock you have assigned to a Get.
     Thus, do not use N_NEWFLD in a Get List where you are using a WHEN
     clause.

5.0: It is important that you issue the following function after adding new
     Gets to the current Get List after a Read has started  (i.e., from
     within a SET KEY procedure or a VALID function):

          N_NEWFLD(N_NEWFLD())

See Also: N_GOTOGET

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson