I am converting my software from I4GL to 4js. In I4GL I used F12 as my accept key and Enter did the same as TAB (next field). My users can't get the hang of Enter being the accept key. An easy fix. Move the acceleratorName of Enter and Return from ActionDefault accept to nextfield, and use F12 as the acceleratorName for accept in the 4ad file.
With OPTIONS INPUT NOWRAP... When in a single CONSTRUCT statement, Enter acts like TAB until the last field where it accepts the input, builds the where_part and exits.
I have a DIALOG with five multi-field CONSTRUCT statements. I use OPTIONS INPUT WRAP so the user can tab and mouse around all five CONSTRUCTS so it looks like a single CONSTRUCT to the user. Enter behaves like TAB because of the 4ad file. Is there a way to have Enter be the accept key and trigger "ON ACTION accept" when it is used on the last field of each CONSTRUCT, but continue to act like TAB on the other fields? Or asked another way...Is there a way to have each CONSTRUCT, in this DIALOG, to act as a single CONSTRUCT on the last field? Keeping in mind, TAB still needs to wrap from CONSTRUCT to CONSTRUCT.
I've tried several things like loading a special 4ad file in a "before last_field" that redefined Enter as the accept key. But you can't load a 4ad file in the middle of a dialog. Putting OPTIONS INPUT WRAP in "before last_field" doesn't work either.
I need to keep the five separate CONSTRUCT statements because I need to search different tables depending on which CONSTRUCT they use.
I have a messy workaround where, in my per file, I define...
action nextfield ( accelerator=Tab )
action returnenter ( accelerator=Return, accelerator2=Enter )
In my 4gl file, in "ON ACTION returnenter", I have INFILED checks to see if I am on the last field of a CONSTRUCT and wrap up the DIALOG.
Any better ideas?
Thanks for your help.