J.M. -
In testing the idea put forward in my last post on this issue I
found problems with the mapping of [F9] to [F7], [F8], and [Enter]. I
didn't look carefully enough at what was getting deleted during the first
round of tests that I mentioned in the last posting, mea culpa. When I took
another look today I found, in the case of mapping to either [F7] or [F8],
that the DELROW was being applied not to the row from which the EEP was
being executed but rather to the next or prior row to which the cursor had
been transferred by the [F7] or [F8]. Also when [F8] was used the form was
not updated properly after the DELROW executed. If the last row in the
table was being displayed and not being deleted it would appear in the last
tier and again a tier or two above the bottom.
David Blocker and Bill Downall mentioned that they had problems
playing back navigational keys and Bill suggested trying several meaningless
keystrokes as a precursor to the ones you want to have effect. This led to
the [Tab] as it is about the most innocuous keystroke used in a form. In a
test that mapped [F9] to a single [Tab] the EEP was simply bypassed the
first time [F9] was pressed as the cursor moved to the next field. The EEP
executed on the second [F9] press. This was in a two column form with the
EEP active on both fields.
For forms with two or more active fields in each tiered row:
When [F9] was mapped to [Tab][Tab] all problems disappeared and [F9]
causes the message to be displayed. If the user chooses to delete the row
the process is the same as with [F9] without this intervention. When [F9]
was mapped to [Enter] the EEP is effective in all rows but the last row in
the set which the form is displaying. Apparently there has to be somewhere
for the cursor to go when [Enter] is pressed in order for RBase to act as if
the form field has been exited.
For forms with only one active field in each tiered row:
[Tab][Tab] DOES NOT WORK for tiered rows having only one active
field. [Enter] performs the same way as it does in multi field rows. Here
I tried adding a second field with an entry EEP that skipped the field. The
solution to this is to put an active dummy variable field in the tiered rows
with an entry EEP containing only the command SKIP -1. Then the column
field is exited and delrow.eep is executed. Note that the dummy field must
have the "New Data can be Entered into the Field" and "User can Change the
Data in the Field" boxes checked in Field Settings.
--------------------------------------------------------------------
*( delrow.eep )
*( [F9] is mapped to [Enter] or [Tab][Tab] so that when [F9] is )
*( pressed the user will exit the field and this EEP will be )
*( executed. )
SET VAR vf9 TEXT = (LASTKEY(1))
IF vf9 <> '[F9]' THEN
RETURN
ENDIF
DIALOG 'YOUR TEXT GOES HERE' vresponse vendkey NO AT 10 10
IF vresponse = 'NO' OR vendkey = '[Esc]' THEN
RETURN
ENDIF
-- delrow.scr contains only the keypress [Enter].
PLAY delrow.scr
DELROW
RETURN
--------------------------------------------------------------------
The EEP tests for the last keypress being [F9] and if not returns
the user to the form. If the keypress was [F9] then the dialog box is
popped up with your message in French and the rest is shown.
Good luck,
Bernie