Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

90 views
Skip to first unread message

marco.b...@gmail.com

unread,
Jun 26, 2017, 5:03:09 AM6/26/17
to
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

acc

unread,
Jun 26, 2017, 5:40:32 AM6/26/17
to
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

marco.b...@gmail.com

unread,
Jun 26, 2017, 6:34:50 AM6/26/17
to
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.

prk...@gmail.com

unread,
Jun 20, 2020, 10:29:26 PM6/20/20
to
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
0 new messages