FMPA 9.0v3 on Mac OS 10.4.11
I'll strip the problem statement down to the bare essentials.
I've got a layout on which there are only 3 things that matter:
• the field "Number Plug" (type: Number, storage: Global,
validation: Numeric always)
• a "Continue" button
• a "Cancel" button
Here's pseudocode for the script that the "Continue" button activates:
If ( Number Plug meets Criterion X )
Perform Procedure Y
Else
Perform Procedure Z
End If
However, before I ever get to testing for Criterion X, I want to be
sure that "Number Plug" contains a valid value. I was already
validating to be sure it was Numeric, but I threw in an additional
validation by computation to be sure that it didn't contain any
spaces, returns, periods, or commas. (Hyphens are allowable, because
I'm willing to accept negative numbers.)
Obviously, if "Number Plug" failed any of these criteria, I wouldn't
want to go on to check for Criterion X. Therefore I revised the above
script to read thus:
Commit Record
If ( Get ( LastError) > 0 )
Halt Script
Else If ( Number Plug meets Criterion X )
Perform Procedure Y
Else
Perform Procedure Z
End If
During testing, everything worked fine if I entered an invalid value,
got my customized "invalid value" dialog, and clicked "OK". The
script halted properly, and I could fix the problem with "Number
Plug", click "Continue" again, and have it do what it was supposed to.
So, with that background, here's the problem. The customized "invalid
value" dialog doesn't just display an "OK" button. It also displays a
"Revert Field" button, and if I click on that, the "LastError" check
apparently doesn't get triggered and I drop thru the script to the
test for Criterion X, followed by either Procedure Y or Z, using an
invalid value for "Number Plug" — most definitely not the desired
outcome.
Is there any way I can stop that "Revert Field" button from being
displayed? Or is there something else I'm missing? I can't figure out
how to trap for that response if it doesn't trigger the "LastError"
check.
= = = = = =
Richard S. Russell, a Bright (http://the-brights.net)
2642 Kendall Av. #2, Madison WI 53705-3736
608+233-5640 • [EMAIL PROTECTED]
http://richardsrussell.livejournal.com/
= = = = = =
For any given complex, expensive, time-consuming problem there exists
at least one simple, cheap, easy wrong answer.