Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form object not exist but Screen Active Form does
Message
 
À
07/01/2000 04:29:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00302767
Message ID:
00314466
Vues:
56
Harry,

Ok, I'll try to be a little more clear. In memory is an object of class form, it has a property named Name and that property has a value. There is also a memory variable in memory that points to the object. The memory variable is a reference to the object that is commonly referred to as the "name" of the obejct, it is NOT the value of the Name property (although it may be at times).

If you do not explicitly assign the variable name at the time you create the object then you really have no way of knowing what that variable pointer is named. When you create an object in code you can assign the name in one of two ways;
oForm = CreateObject("MyFormClass") && Obj name is oForm

or

DO FORM MyForm NAME oForm && Obj name is oForm
When you just DO FORM MyForm you are letting VFP decide what variable name to use to point to the form.

If you decide to let VFP assign the references then you are best to use the _screen.ActiveForm and _screen.Forms() collection to refer to the forms that exist. Don't try using variable names because you can never be sure what they are going to be (because you didn't assign them).
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform