user manual
74 Chapter 4: Property Management
Registering Properties iTool Developer’s Guide
Registering Properties
In order for a property associated with an iTool component to be included in the
property sheet for that component, the property must be registered with the iTool.
The property registration mechanism accomplishes several things:
• It allows you to expose as many or as few of the properties of an underlying
object as you choose.
• It allows you to add user-defined properties to existing objects, and expose
those new properties to users of your application.
Note
You can write code to access and change property values programmatically, even if
the property being changed is not registered.
Registering a Property
Register a property by calling the RegisterProperty method of the IDLitComponent
class:
self->RegisterProperty,
PropertyIdentifier
[,
TypeCode] $
[, ATTRIBUTE = value]
where PropertyIdentifier is a string that uniquely identifies the property, TypeCode is
an integer between 0 and 9 specifying the property data type, and ATTRIBUTE is a
property attribute. You can specify multiple property attributes in the call to
RegisterProperty; see “Property Attributes” on page 78 for details.
Note
The property identifier string must obey certain rules; see “Property Identifiers” on
page 77 for details.
You can omit the TypeCode parameter and specify a type keyword; the following two
method calls are identical:
self->RegisterProperty, 'MYPROPERTY', 1
self->RegisterProperty, 'MYPROPERTY', /BOOLEAN
See “Property Data Types” on page 71 for a list of property data types, their type
codes, and the associated keywords to the RegisterProperty method.
A typical property registration call looks like the following: