A SERVICE OF

logo

262 Chapter 10: Creating a File Writer
Creating a New File Writer iTool Developer’s Guide
Return Value
If all of the routines and methods used in the Init method execute successfully, it
should indicate successful initialization by returning 1. Other file writer classes that
subclass from your file writer class may check this return value, as your routine
should check the value returned by any superclass Init methods called.
Registering Properties
File writer objects can register properties with the iTool. Registered properties show
up in the property sheet interface shown in the system preferences browser (described
in “Properties of the iTools System” on page 85), and can be modified interactively
by users. The iTool property interface is described in detail in Chapter 4, “Property
Management”.
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. See “Registering Properties” on page 74 for details.
Note
A file writer need not register any properties at all, if the write operation is simple.
Many of the standard iTool image file writer work without registering any
properties.
Setting Property Attributes
If a property has already been registered, perhaps by a superclass of your file writer
class, you can change the registered attribute values using the SetPropertyAttribute
method of the IDLitComponent class:
self->SetPropertyAttribute,
Identifier
where Identifier is the name of the keyword to the GetProperty and SetProperty
methods used to retrieve or change the value of this property. (The Identifier is
specified in the call to RegisterProperty either via the PropertyName argument or the
IDENTIFIER keyword.) See “Property Attributes” on page 78 for additional details.