Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I know If a Object exist?
Message
From
20/11/1998 16:36:33
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00159912
Message ID:
00159978
Views:
24
>>>I'd like to know i a Object exist on my form when I call it.
>>>For Example: I'd like to know if "command1" exist
>>
>>IF TYPE("thisform.command1") == "O" AND !isnull("thisform.command1")
>>*** object exists
>>ENDIF
>
>Should be
>IF TYPE("thisform.command1") == "O" AND !isnull(thisform.command1)
>Just copied from the first part and forgot to delete the quotes... :)

Which is why I love vartype in 6.0... you can shorten the above to...

if vartype(thisform.command1) == "O"
** object exists
endif

BOb
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform