Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange function
Message
De
29/03/2003 09:27:44
Alan Harris-Reid
Baseline Data Services
Devon, Royaume Uni
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Strange function
Divers
Thread ID:
00771707
Message ID:
00771707
Vues:
102
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
Fil
Voir

Click here to load this message in the networking platform