Information générale
Catégorie:
Gestionnaire d'écran & Écrans
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement