IDLitComponent::EditUserDefProperty
Syntax | Return Value | Arguments | Keywords | Example | Version History
The IDLitComponent::EditUserDefProperty function method defines the interface that is displayed when a user selects the "Edit" button on a user-defined property in the property sheet interface. Typically, this method will display an interactive dialog that allows the user to change the value of the property.
Note
An iTool object class that includes a user-defined property must implement this method if the property is displayed in a property sheet — that is, if the property is registered and not hidden. If an iTool object class has no user-defined properties that are displayed in a property sheet, there is no need to supply an EditUserDefProperty method.
See User Defined Property Types (iTool Developer's Guide) for a discussion of how the property sheet interface displays user-defined properties.
Syntax
Result = Obj->[IDLitComponent::]EditUserDefProperty(iTool, PropertyIdentifier)
Return Value
Returns a 1 if the property value was changed, or a 0 if the property value was not changed.
Note
If the return value is 1, the property sheet interface automatically updates the displayed property value using the value of the property's USERDEF attribute. If the return value is 0, no update takes place.
Arguments
iTool
An object reference to the current iTool object.
PropertyIdentifier
A string containing the property identifier of the user-defined property.
Tip
Since there can only be one EditUserDefProperty method for each class, you can use the PropertyIdentifier argument to determine which user-defined property is being edited.
Keywords
None
Example
The following is the EditUserDefProperty method of the IDLitOpConvolution operation class. Selecting and editing the Kernel property of this operation displays a dialog that allows the user to edit a convolution kernel.
FUNCTION IDLitopConvolution::EditUserDefProperty, oTool, $ identifier CASE identifier OF 'KERNEL': RETURN, oTool->DoUIService('ConvolKernel', self) ELSE: ENDCASE RETURN, 0 END
This method simply checks the property identifier to determine whether it matches the string 'KERNEL'. If it does, it returns the value returned by the DoUIService method; otherwise it returns zero. In this case, the DoUIService method actually handles the modification of the property value. See User Defined Property Types (iTool Developer's Guide) for additional discussion.
Version History