AcquireExtension
TheAcquireExtensionmethod returns a reference to the specified extension object.
ODExtension AcquireExtension (in ODType extensionName);
extensionName- The name of the extension to acquire. The value of
extensionNamemust be one of the following:kODExtSemanticInterface,kODSettingsExtension, or a part-specific string.- return value
- A reference to the specified extension object.
DISCUSSION
Your part calls this method to obtain a reference to an extension object with the specified extension type. If the subclass does not support the specified extension, this method raises an exception. TheODObjectclass has no inherent extensions of its own and therefore always raises an exception.Your override of this method should increment the reference count of the returned extension. When you have finished using that extension, you should call its
Releasemethod.OVERRIDING
Your subclass ofODPartcan override this method if your part supports extensions. If your part does not support the specified extension, your override method must call its inheritedAcquireExtensionmethod at the end of your implementation.EXCEPTIONS
kODErrUnsupportedExtension- The specified extension is not supported by this object.
SEE ALSO
TheODObject::HasExtensionmethod (page 441).
TheODObject::ReleaseExtensionmethod (page 444).
TheODPartclass (page 459).
Table 2-1 on page 89 in OpenDoc Programmer's Guide.
"Using an Extension" on page 444 in OpenDoc Programmer's Guide.
Table 11-1 on page 466 in OpenDoc Programmer's Guide.
"Making Your Semantic-Interface Extension Available" on page 433 in OpenDoc Programmer's Guide.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help