Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does form exists?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00394154
Message ID:
00394331
Views:
13
>>>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".
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform