Hello all!
Is there any posibilty to find find out at runtime, if a specific key is on/off?
Like that:
if KEY PF3 is OFF
...
else
set KEY PF3=ON
end-if
Thanks,
Matthias
Hello all!
Is there any posibilty to find find out at runtime, if a specific key is on/off?
Like that:
if KEY PF3 is OFF
...
else
set KEY PF3=ON
end-if
Thanks,
Matthias
Hi Matthias;
Are you just referring to whether or not a key is Program Sensitive in a single program? If so, you could set a flag when you do the SET KEY statement.
I presume, however, you are dealing with multiple objects at different levels. This gets messy. You could pass “flags” from object to object, but that is clearly messy, especially if the objects already exist.
Using Global Variables for flags might be a valid approach. HOWEVER, this would require centralized control/knowledge of all the objects. A subprogram written by another person/group could establish a PF key without the knowledge of the project team.
Perhaps a change enhancement request?
steve
Hi Matthias;
Just to save you time if you haven’t already tried this path.
I thought about “trapping” a NAT1011 which is an unassigned PF/PA key, in an ON ERROR clause. This does not work because Natural “acts” on the error before control gets returned to the program.
Interesting though. Since Natural knows enough to issue the 1011, clearly it has a table of assignments for the keys. Perhaps this could be made available through a USR.
steve
Thanks for answering!
Do you mean a SET CONTROL ‘%K03’… INPUT combination? Nice idea!!
ACK
Hi Matthias,
perhaps the API USR4005N does what you’re looking for.
Hi Matthias,
perhaps the API USR4005N does what you’re looking for.
There’s no USR4005 on Windows / Solaris (both Vers. 6.1.1)