The @when user key function/feature....
Brian K. White
brian at aljex.com
Wed Oct 27 15:14:49 PDT 2010
On 10/27/2010 2:15 PM, John Esak wrote:
>
> @wukNNN - F3, F4, F8, F9
>
> So how many people use this great function?
>
> I think it is often overlooked, and I know I use it a lot in all my stuff.
>
> My feeling is it allows a whole extra level of processing, i.e., a whole
> different place to "be' when you're inside a filePro program. It has some
> trickyness to it when you first use it, but it is so worthwhile. Does
> anyone have any questions about it or any good suggestions regarding it?
>
>
> 4.1 @WUKnnn When user keys F3 , F4 , F8 or F9 is pressed
> in field "nnn". When the key is pressed, the special
> key label can be tested by using system maintained
> field @sk. The following key labels apply.
>
> F3 INSL
> F4 DELL
> F8 DPRT
> F9 GRAF
>
>
>
> This is the HELP for the feature... I don't think many would use the feature
> if this is all they ever saw about it. Any comments?
I use F8 and F6 in a program where I want to be able to pop up something
no matter where the user is on the screen, while in input/update mode.
(no @keys, they are pressing all those keys as normal input into some
field or other because they are in update mode)
Whatever field on the screen the user is sitting on, if you press F8, I
pop up update a small screen that has further detail fields associated
with that field.
Similarly, if you press F6 anywhere, I do something that pertains to the
entire screen, which is display a sort of on the spot dry-run of the
data as it currently stands.
Starting with the main screen:
http://www.aljex.com/tmp/ml_m.png
Go into update mode and press F8 while in and of the 3 fileds on top,
Name Title, Description. It pops up freeform programming/usage notes
about the menu, such as how the return values are used (so you know they
need to be integers in this case for example), and a pointer to a table
that uses that menu:
http://www.aljex.com/tmp/ml_mnd.png
save or break out of that and move to either the 1 or the description
next to 1, and press F8. You get more details about menu choice 1.
The idea is these are optional, so you don't need to pop this up at all,
a default return value is created that matches the keystroke.
http://www.aljex.com/tmp/ml_m1d.png
Same goes for 2 or 2's description. Press F8 on either field and get 2's
detailed view:
http://www.aljex.com/tmp/ml_m2d.png
Press F6 on any field anywhere and the menu is test-run right there
while you're editing it:
http://www.aljex.com/tmp/ml_t.png
Now in the application that uses this menu the result looks like:
initial popup:
http://www.aljex.com/tmp/ml_r1.png
Pressing EscEsc on item 1:
http://www.aljex.com/tmp/ml_rh.png
Which brings up a limitation.
Why in the world am I using ESC ESC to display help???
Because this "menu" call table is implemented using listbox, and the
only special keys I could figure out how to use at all from listbox were
SAVE and BREAK.
Well I definitely want BREAK to always be the way to abort out of any
menu without performing any of it's actions. And I wanted to have a way
for the user to hover on a menu choice and pull up help about that
choice. So that only left SAVE.
I WISH I could detect the F10 or HELP key from a listbox to pop up help
associated with the currently highlighted listbox entry. I currently do
this by looking at @sk after the listbox returns to detect the
difference between pressing Enter and pressing SAVE or esc esc. In
either case, listbox() returns the index of the highlighted entry, but
in the case of esc esc I see SAVE in @sk and I display the help for
choice N instead of actually performing choice N.
Yet another change even lowly me could probably manage to do if I had
the source. And it would make my app so much nicer. At some point I
spent a day or more trying to get what I wanted, and failing, and then
figuring out whats the closest I could possibly come. What a no-brainer
to instead spend that same day getting exactly what I want, ten years
ago, and having ten and counting years of the app working nicer.
I could probably rewrite this call table somehow using the actual menu
command, but I don't want the limitations of a regular menu. I like the
listbox & show popup.
Maybe I could come close to listbox type interface, but with the ability
to detect more exit keys, by changing the way the data is stored to be
in header/detail records like it really should be and then I could use
browse instead of listbox.
--
bkw
More information about the Filepro-list
mailing list