![]() |
![]()
| ![]() |
![]()
NAMEInstantiate — open a document factory SYNOPSIS[file] Instantiate(in mediaType template); DESCRIPTIONThe Instantiate request causes the handler to open a factory for mediaType documents based on template. Usually this means opening an untitled buffer not bound to any file. The handler replies when the untitled buffer is successfully opened. The template argument is the template of the document. If this argument is unset (in other words, has a value of (char *)0), then the template to us is in the file named in the message's file attribute. If the file attribute is also unset, no template has been supplied, and the factory should use its default template (usually, an empty buffer). The data type (mediaType) of the template argument should be string, unless nulls are valid in the given media type, in which case the data type must be bytes. APPLICATION USAGEThe ttmedia_ptype_declare(3) function can be used to register for, and help process, this message. This message can be sent with the ttmedia_load(3) function. EXAMPLESTo instantiate an appointment document, the application can send an Instantiate request with a first argument whose vtype is DT_APPOINTMENT. ERRORSThe ToolTalk service may return one of the following errors in processing the Instantiate request:
SEE ALSOttmedia_ptype_declare(3), ttmedia_load(3); Intro, Deposit, Edit, Status requests.
|