At 10:57 2015-07-07, Ken Dibble <[email protected]> wrote:
With not much to go on, I suggest that you examine each of the
items in the statement to see that they really are what you think
they are. Something may have been overwritten. In particular,
start by checking that oMyObject and oMyOtherObject are of type
object, that neither is .null., and that each refers to the correct class.
Well, I can't reproduce this error; it has only occurred once in the
lifetime of the application. Unfortunately my error handler doesn't
directly report the status of objects.
Upon looking closer, the last level in the call stack before the
error is triggered is the call:
oMyOtherObject.Method("fieldname")
The Error() method of that object comes next in the stack so
presumably that object exists.
Since VFP typically practices "lazy" parameter evaluation, I would
also assume that oMyObject.Method() encountered this error when it
arrived at that third parameter, which would imply that oMyObject also exists.
VFP does not do lazy evaluation much at all! (The only
exception to this that comes to mind is the second and third
parameters to iif().) Consider:
***** Start of Sample Program *****
set talk off
result=theudf(1,2,-5^4.5)
? result
return
procedure theudf
lparameters one,two,three
? one
? two
? three
return 0
endproc
***** End of Sample Program *****
On execution, this will blow up in the call, not in theudf().
The table in question cannot contain NULLs; none of my tables can.
However, just to be sure, I also opened the table and did a LOCATE
for ISNULL(field). It didn't find any.
Thanks for any help.
You are welcome. You have a nasty one. Either you will find
you overlooked some little detail (and only you have much hope of
finding such) or you will find a weird VFP bug (which I have been
there, done that myself).
Myself, I am in the middle of a change request that is turning
out to be downright nasty. The basic change is simply described, but
there are some nasty consequences under the hood that I have to deal
with. I hope I do not end up with some nasty bugs like the one you
are fighting.
Sincerely,
Gene Wirchenko
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.