Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form object not exist but Screen Active Form does
Message
De
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:
00314380
Vues:
50
>Harry,
>
>You are confusing the value of teh boject's name proeprty with the name of the reference to the object.

how so?

I only mentioned those items because I've read elsewhere that vfp can get confused if the object name reference ISN'T the same as the file name, so I've deliberately ensured that this is not the case.

>
>If you do not specify what name should reference the object then it is a name assigned by VFP whihc may or may not be the same as the name property's value.

aha - now run this past me slowly! Are you saying that vfp may be using a different form name to both the file name and the name property value? If so why so? and how do we know what name to use in calling the form? And also, if that is the case, then how come _SCREEN.ACTIVEFORM.NAME confirms that the name being used is precisely what I'd expect?

>
>If you need to reference an object from outside of its own scope (in its own methods or the methods of its contents) you need to insure that you have a valid reference to the object available.

I appreciate that - but in the example I've given, my problem is that I can't even access those methods when the form clearly should be 'in scope' (i.e. when the form is active on screen and no other objects have focus)

> With a form you can do this by;
>
>DO FORM Whatever NAME VarReference
>
>Then VarReference will refer to the form as long as VarReference is in scope.

perhaps I'm not understanding what sort of events will cause the reference to go out of scope...

>
>A much more flexible approach is not to let any code DO a form, but rather have a formmanager object with a method for running forms. [snip]

as indeed you've previously recommended and I will pursue the examples you pointed me to. But I still have a peculiar problem here which I would like to understand rather than merely avoid!

Thanks

Harry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform