OWLNext 7.0
Borland's Object Windows Library for the modern age
|
There are a number of functions provided in both TDocument and TView for accessing Doc/View object property information.
All these functions are declared virtual. Because the property access functions are virtual, the function in the most derived class gets called first, and can override properties defined in a base class. It is the responsibility of each class to implement property access and to resolve its property names.
You normally access a property by its index number. Use the FindProperty function with the property name. FindProperty takes a char * parameter and searches the property list for a property with the same name. It returns an int, which is used as the property index for succeeding calls.
You can also use the PropertyName function to find the property name from the index. PropertyName takes an int parameter and returns a char * containing the name of the property.
You can get the attributes of a property using the PropertyFlags function. This function takes an int parameter, the index of the desired property, and returns an int. You can determine whether a flag is set by using the & operator. For example, to determine whether you can get a property value in text form, you can check to see whether the pfGetText flag is set, as follows: