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_gotoget(<getn>|<variablec>) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Syntax: N_GOTOGET(<getN>|<variableC>)

Move cursor to specified input field.

Example

N_GOTOGET(N_GETNO()-1)        && move back one field
N_GOTOGET(N_LASTGET())        && move to last field on screen
N_GOTOGET(1)                  && goto first input field
N_GOTOGET("Mssno")            && move to SSno field

Notes

If an invalid Get is specified or if no Gets are active then no action is
taken.

Use Within Valid Functions

Clipper moves the cursor to the next Get (or prior Get, depending on the key
pressed) after returning True from a Valid function.   You must keep this in
mind when using N_GOTOGET from inside a Valid function.

     LASTKEY()                          Cursor moves to
     13 (Enter)                         Next Get
     24 (.)                             Next Get
      5 (.)                             Prior Get
     >= 32 (displayable character)      Next Get (Confirm Off only)

The following UDF can be used inside a Valid Function to make sure that the
cursor actually moves to the correct Get.

     FUNCTION  goto_get
     PARAMETER Mget                && name or number
     PRIVATE Mgetno
     * Change to number if name
     Mgetno = IF(TYPE("Mget") = "C",N_GETNO(Mget),Mget)
     N_GOTOGET(IF(LASTKEY() = 5,Mgetno+1,Mgetno-1))
     RETURN N_GETNO()

No special considereration is needed when using N_GOTOGET inside a SET KEY
procedure, a HELP procedure, or when returning False from a Valid function.

See Also: N_GETNO N_LASTGET

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