
Chapter 4: Property Management 81
iTool Developer’s Guide Property Aggregation
Property Aggregation
The iTools property aggregation mechanism allows the properties of several different
objects held by the same container object to be displayed in the same property sheet
automatically. Without property aggregation, you would have to manually register all
of the properties of the objects contained in your visualization type object.
Aggregate the properties of contained objects using the Aggregate method of the
IDLitVisualization class:
self->Aggregate,
Object_Reference
where Object_Reference is a reference to the object whose properties you want
aggregated into the visualization object. A typical property aggregation call looks like
the following:
self._oSymbol = OBJ_NEW('IDLitSymbol', PARENT = self)
self->Aggregate, self._oSymbol
Here, the first line creates an IDLitSymbol object and stores it in the _oSymbol field
of the visualization object’s class structure. The second line calls the Aggregate
method with the object reference to the IDLitSymbol object as the argument. After
the call to the Aggregate method, all registered properties of the IDLitSymbol object
will be exposed in the property sheet for the visualization itself.
Note
The IDLitVisualization::Add method includes an AGGREGATE keyword. This
keyword is simply a shorthand method of aggregating the properties of an object
during the call to the Add method, eliminating the need to call the Aggregate
method separately. The call
self->Add, Object_Reference, /AGGREGATE
is the same as the following two calls:
self->Add, Object_Reference
self->Aggregate, Object_Reference
Warning
Take care when naming properties of objects that will be aggregated into a custom
visualization. If the complete name of a property in one of the aggregated objects
matches the prefix of the name of a property in another of the aggregated objects,
IDL will display an “Ambiguous keyword abbreviation” error when the aggregate
object is instantiated. To combine objects with ambiguous property names, you