• how to change setkey(....) functionality during get

    From marco.boeri.63@gmail.com@21:1/5 to All on Mon Jun 26 02:03:08 2017
    Hi,
    I'm facing a problem I don't know how to solve.
    I've a complex get with several fields that may be populated directly with a code or found by activating an F.. key with a lookup in a linked table.
    For each get object I may have different f.. keys with diferent functionality, i.e.
    @ 2,2 get cvatcode pict "@!" (pressing F2 opens a tbrowse to lookup, pressing F4 opens a frame with the amounts divided by code)
    @ 3, 2 get cUM pict "@!" (pressing F2 opens a tbrowse to lookup, but I need to disable F4 key, and, maybe, to enable another F.. key for other purpose.
    ...
    ...
    READ

    In addition each get has it's own message that it isn't at line 24 and centered, but it must be shown at the bottom of the window, whose dimensions and coordinates arent those of the entire screen.
    In the past I had solved giving a READ after each get but it's inelegant and with very complex forms it's unmanageable.

    There is another way to do it?

    Regards
    Marco

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From acc@21:1/5 to All on Mon Jun 26 11:40:28 2017
    Il 26/06/2017 11.03, marco.boeri.63@gmail.com ha scritto:
    Hi,
    I'm facing a problem I don't know how to solve.
    I've a complex get with several fields that may be populated directly with a code or found by activating an F.. key with a lookup in a linked table.
    For each get object I may have different f.. keys with diferent functionality, i.e.
    @ 2,2 get cvatcode pict "@!" (pressing F2 opens a tbrowse to lookup, pressing F4 opens a frame with the amounts divided by code)
    @ 3, 2 get cUM pict "@!" (pressing F2 opens a tbrowse to lookup, but I need to disable F4 key, and, maybe, to enable another F.. key for other purpose.
    ...
    ...
    READ

    In addition each get has it's own message that it isn't at line 24 and centered, but it must be shown at the bottom of the window, whose dimensions and coordinates arent those of the entire screen.
    In the past I had solved giving a READ after each get but it's inelegant and with very complex forms it's unmanageable.

    There is another way to do it?

    You can use the WHEN clause to pre-validate a get (code is executed when
    the get receive the focus) and the VALID clause to post-validate a get
    (code is executed when the get lost the focus).
    You can use obj:varGet() to obtain the current get object, look at SRC\SYS\GETSYS.PRG.

    PS: c'e' anche it.comp.lang.vo-clipper

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From marco.boeri.63@gmail.com@21:1/5 to All on Mon Jun 26 03:34:48 2017
    Hi,
    thanks for your reply.
    I'm aware of the When-Valid clause but i was thinking of a deeper modification of the get system, like, for example, the GET... PASSWORD implementation. Symply, even if I carefully read the examples of GET and examined the code of other authors I'm not
    able to find a solution (nor I know where to start).

    Regards,
    Marco
    ps. I know it.comp... but currently there are few followers there.

    You can use the WHEN clause to pre-validate a get (code is executed when
    the get receive the focus) and the VALID clause to post-validate a get
    (code is executed when the get lost the focus).
    You can use obj:varGet() to obtain the current get object, look at SRC\SYS\GETSYS.PRG.

    PS: c'e' anche it.comp.lang.vo-clipper

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From prkell@gmail.com@21:1/5 to All on Sat Jun 20 19:29:25 2020
    Em segunda-feira, 26 de junho de 2017 06:03:09 UTC-3, marco....@gmail.com escreveu:
    Hi,
    I'm facing a problem I don't know how to solve.
    I've a complex get with several fields that may be populated directly with a code or found by activating an F.. key with a lookup in a linked table.
    For each get object I may have different f.. keys with diferent functionality, i.e.
    @ 2,2 get cvatcode pict "@!" (pressing F2 opens a tbrowse to lookup, pressing F4 opens a frame with the amounts divided by code)
    @ 3, 2 get cUM pict "@!" (pressing F2 opens a tbrowse to lookup, but I need to disable F4 key, and, maybe, to enable another F.. key for other purpose.
    ...
    ...
    READ

    In addition each get has it's own message that it isn't at line 24 and centered, but it must be shown at the bottom of the window, whose dimensions and coordinates arent those of the entire screen.
    In the past I had solved giving a READ after each get but it's inelegant and with very complex forms it's unmanageable.

    There is another way to do it?

    Regards
    Marco

    You can create functions touse with WHEN and finalising with VALID

    This is worked in portuguese

    @ 06,52 GET v_grupo PICT "@!" ;
    WHEN podepesq("GRP") ;
    VALID acha(v_grupo,"GRP",.F.,1).AND. ;
    fala(06,52,v_grupo+" - "+GRP->nomgrup) .AND.;
    podepesq("")

    podepesq is a function that creates a kind of search/with FUNCTION KEY (something)
    acha is FIND/SEEK
    fala is Write a frase
    the empty podepesq disables the prior function

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)