General information
Category:
Forms & Form designer
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only