Important: The information in this document is obsolete and should not be used for new development.
CreateCyberPart
Creates a new Cyberdog display part to replace an opener part.
ODPart CreateCyberPart (in ODPart openerPart, in ODType partType, in ODEditor optionalEditor);
openerPart- The opener part to be replaced by the new display part.
partType- The part kind to create.
optionalEditor- The part editor to create.
- return value
- The newly created part.
DISCUSSION
This method is called by a Cyberdog item during the opening process to create a new Cyberdog display part. This method determines the correct draft in which to create the new part by calling the specified opener part'sGetDestinationDraftmethod.If
GetDestinationDraftreturns a draft, the opener part is contained in some OpenDoc document other than the Cyberdog session document;CreateCyberPartcreates the new part in the same draft that contains the opener part. IfGetDestinationDraftreturnskODNULL, the opener part is contained in the session document. In this case,CreateCyberPartcallsCreatePartInCyberDocumentto create the new part in the Cyberdog session document.If you specify
kODNULLfor theoptionalEditorparameter,CreateCyberPartcreates the default editor for the part kind specified by thepartTypeparameter.Do not subclass this class.
SEE ALSO
TheCreatePartInCyberDocumentmethod (page 357).
TheCyberOpenerPartExtension::GetDestinationDraftmethod (page 272).