LL>When you're calling other built-in methods from within a built-in
LL>method, you're actually suspending the first built-ins until the
LL>others finish processing. Then, when the called methods finish, the
LL>calling method resumes its merry pace.
I'm pretty sure I understand this, and I have no problem with Paradox
continuing to execute code when a called method has failed. I would
expect Paradox to keep executing methods even if some have failed,
unless I specifically tell it to stop the method altogether, but there
is one little thing that kind of bothers me. Let's say I have three
buttons named Button1, Button2, Button3. Button1 is the main button,
and all it does is call Button2 and Button3 sequentially, like this:
method pushButton(var eventInfo Event)
Button2.pushButton()
Button3.pushButton()
endMethod
Now, the code for Button2 is as follows:
method pushButton(var eventInfo Event)
var
dt date
endVar
dt = date( "This is not a date" )
endMethod
Obviously this method will fail, and cause a critical error, and bring
up that error dialog box. This does happen when I run the form and
click on Button2.
Finally, the code for Button3 can be anything that doesn't cause an
error, such as:
method pushButton(var eventInfo Event)
msgInfo( "ATTENTION" , "Something doesn't seem right" )
endMethod
Now, if I run the form, and click on Button1, ALL that happens is that
my message info dialog box comes up. I expect the message info box to
come up, but why doesn't Paradox report the critical error that happens
in Button2? Paradox has totally ignored a critical error, and I'm not
so sure that is a good thing. Now if I put the code in Button2 into a
custom method and call it from Button1, I get the error dialog box. But
using pushButton(), I get no error dialog box from Paradox. I also get
no error box if I use mouseDown(), so I assume this holds true for all
the mouse methods. I haven't sat down yet and rigged up an action
method, but I'll try it. Maybe this has something to do with the fact
that setting the errorCode in Button2 had no effect on the calling
button. Even if I set the errorCode in Button2 to a non-zero number,
this isn't passed to the calling method, or it is but is ignored. I
find it strange that if I check the return value of the pushButton()
method for Button2, and immediately exit the calling method with a
return if the value is false, I will then get the error dialog box. But
if the code continues on, and the pushButton() method for Button3 is
executed, I get no error dialog box from the critical error that
happened in Button2.
Robert
--- WILDMAIL!/WC v4.12
---------------
* Origin: The Solution II BBS*Quakertown,Pa*(215)529-9501 (1:2614/205.0)
|