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

    From prkell@prkell@gmail.com to comp.lang.clipper on Sat Jun 20 19:29:25 2020
    From Newsgroup: comp.lang.clipper

    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
    --- Synchronet 3.21d-Linux NewsLink 1.2