Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does form exists?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00394154
Message ID:
00394375
Vues:
12
>>>>Also you can check if
>>>>
>>>>TYPE("thisform.myobject")= "O"
>>>>
>>>>and check for !ISNULL(thisform.myobject)
>>>
>>>I can see the need to check ISNULL() for an object variable pointing to an object that may have been destroyed. But how would THISFORM.myobject become .NULL. if it existed?
>>
>>It may look excessive, and probably it is, but truly speaking thisform.myobject syntax by mistake may point to the form property which contained the object reference and was reset to .NULL.
>>Theoretical scenario: It is possible to remove the form object, then add the property with the same name, assign object to it and reset property to .NULL.
>>
>>Now you have
>>
>>TYPE("_screen.activeform.text1") = "O"
>>and _screen.activeform.text1 equals to .NULL.
>>
>>Voila! :)
>>
>>Oh, well, that may be an overkill... :)
>
>I'd say it is overkill. You could just as easily add the property with the same name, set it to a wrong object, and not set it to .NULL. and the test would still come out wrong. These both seem like rare, equally likely "hostile cases".

Except you cannot add the form property with the same name as existing form object.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform