Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange function
Message
From
29/03/2003 09:27:44
Alan Harris-Reid
Baseline Data Services
Devon, United Kingdom
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Strange function
Miscellaneous
Thread ID:
00771707
Message ID:
00771707
Views:
104
I've noticed recently in one of my function libraries the following function (I think it originally came from Codebook 3.0!)

FUNCTION FormIsObject()
* Returns .T. if the active form is of type "O" and its baseclass
* is 'Form'.
RETURN (TYPE('_screen.activeform')=='O' AND ;
UPPER(_screen.ActiveForm.BaseClass)='FORM')
ENDFUNC

It is called from a toolbar close button as follows...
PROCEDURE Click
IF _screen.ActiveForm.QueryUnload()
IF FormIsObject()
RETURN _screen.ActiveForm.Release()
ENDIF
ENDIF
ENDPROC

Questions...
1. Under what circumstances can _screen.activeform not be of type 'O'?
2. Can _screen.ActiveForm.BaseClass be anything other than 'FORM'?

I am trying to ascertain as to whether FormIsObject() has any use any more. Does anyone else have similar checking code in their foundation classes?

Any help would be appreciated.
Alan
Next
Reply
Map
View

Click here to load this message in the networking platform