Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Doro Galla
  Where is Doro Galla?
 Pittsburgh
 Pennsylvania - United States
 Doro Galla
 Tags
Subject: vartype() and pemstatus() problems
Thread ID: 78497 Message ID: 78497 # Views: 1 # Ratings: 0
Version: Visual FoxPro 8 Category: Errors & Debugging
Date: Tuesday, October 04, 2005 3:26:33 PM         
   


Foxiters;

I have written custom error handler that’s in my form. And I have written a small routine to test in the object like a button to see if it’s available. If object is on the form it works fine.

But when I added those tests in a custom class library the test fails.

This is how I test for it in my custom class lib:

IF VARTYPE(THISFORM) = 'O'
IF pemstatus(THISFORM, 'handle_error', 5)
* if there's form level EH use it
THISFORM.handle_error(nError, cMethod, nLine)
ENDIF
ENDIF

In the debugger it finds that VARTYPE(thisform) expression cannot be evaluated. I expected this yet execution goes to the pemstatus() test and thisform cannot be evaluated either.

Why did vartype() … allow this, if thisform is an object at this point why did pemstatus() fail?

Thanks for any help you can give me.
doro

ENTIRE THREAD

vartype() and pemstatus() problems Posted by Doro Galla @ 10/4/2005 3:26:33 PM
RE: vartype() and pemstatus() problems Posted by Paul Brown @ 10/4/2005 3:31:09 PM
RE: vartype() and pemstatus() problems Posted by Andy Kramek @ 10/4/2005 8:51:54 PM
RE: vartype() and pemstatus() problems Posted by Doro Galla @ 10/5/2005 3:07:24 PM