Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to check if a property exists for a control 1

Status
Not open for further replies.

alvinjones

Technical User
Nov 11, 2007
6
DE
I am using a Borland Caliber object. In the Attributes depending on the information contained there is a property called 'Path' (if it is a file path) or 'URL' (if it is a web address). Only one of these will exist.
How can I check which property exists?
 
alvinjones

If you address the property, you get an error if it is not there or not if it exists. So use On Error Resume Next reffer to property URL and check the err.Number If it is 0 then the property exists, else refer to the other one.
 
<is it an Attribute or a property?

I've found a real lack of consensus on how these words are used. The way I explain it in OO classes is to say that if you use "is" and an adjective, that's an attribute (a car is red), and if you use "has" and a noun, that's a property (a car has wheels). Then I usually say that it's generally more convienient not to draw the distinction and to use one or the other, and I move on quickly. :)

SB, what's your take on this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top