Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Cyberdog Programmer's Kit / Part 3 - Cyberdog Reference
Chapter 7 - Classes and Methods / CyberSession


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's GetDestinationDraft method.

If GetDestinationDraft returns a draft, the opener part is contained in some OpenDoc document other than the Cyberdog session document; CreateCyberPart creates the new part in the same draft that contains the opener part. If GetDestinationDraft returns kODNULL, the opener part is contained in the session document. In this case, CreateCyberPart calls CreatePartInCyberDocument to create the new part in the Cyberdog session document.

If you specify kODNULL for the optionalEditor parameter, CreateCyberPart creates the default editor for the part kind specified by the partType parameter.

Do not subclass this class.

SEE ALSO
The CreatePartInCyberDocument method (page 357).
The CyberOpenerPartExtension::GetDestinationDraft method (page 272).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996