Instanti.sgm 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <!-- $XConsortium: Instanti.sgm /main/6 1996/09/08 20:14:38 rws $ -->
  2. <!-- (c) Copyright 1995 Digital Equipment Corporation. -->
  3. <!-- (c) Copyright 1995 Hewlett-Packard Company. -->
  4. <!-- (c) Copyright 1995 International Business Machines Corp. -->
  5. <!-- (c) Copyright 1995 Sun Microsystems, Inc. -->
  6. <!-- (c) Copyright 1995 Novell, Inc. -->
  7. <!-- (c) Copyright 1995 FUJITSU LIMITED. -->
  8. <!-- (c) Copyright 1995 Hitachi. -->
  9. <RefEntry Id="CDEMX.MAN98.rsml.1">
  10. <RefMeta>
  11. <RefEntryTitle>Instantiate</RefEntryTitle>
  12. <ManVolNum>special file</ManVolNum>
  13. </RefMeta>
  14. <RefNameDiv>
  15. <RefName><Filename>Instantiate</Filename></RefName>
  16. <RefPurpose>open a document factory
  17. </RefPurpose>
  18. </RefNameDiv>
  19. <!-- $XConsortium: Instanti.sgm /main/6 1996/09/08 20:14:38 rws $-->
  20. <!-- CDE Common Source Format, Version 1.0.0-->
  21. <!-- (c) Copyright 1993, 1994 Hewlett-Packard Company-->
  22. <!-- (c) Copyright 1993, 1994 International Business Machines Corp.-->
  23. <!-- (c) Copyright 1993, 1994 Sun Microsystems, Inc.-->
  24. <!-- (c) Copyright 1993, 1994 Novell, Inc.-->
  25. <RefSynopsisDiv>
  26. <Synopsis>[<Symbol Role="Variable">file</Symbol>] Instantiate(in <Emphasis>mediaType template</Emphasis>);
  27. </Synopsis>
  28. </RefSynopsisDiv>
  29. <RefSect1>
  30. <Title>DESCRIPTION</Title>
  31. <Para>The
  32. <Emphasis>Instantiate</Emphasis> request causes the handler to open a factory for
  33. <Emphasis>mediaType</Emphasis> documents based on
  34. <Emphasis>template</Emphasis>. Usually this means opening an untitled buffer not bound to any file.
  35. The handler replies when the untitled buffer is successfully opened.
  36. </Para>
  37. <Para>The
  38. <Emphasis>template</Emphasis> argument
  39. is the template of the document.
  40. If this argument is unset
  41. (in other words, has a value of
  42. <Literal>(char *)0</Literal>), then the template to us is in
  43. the file named in the message's
  44. <Symbol Role="Variable">file</Symbol> attribute. If the
  45. <Symbol Role="Variable">file</Symbol> attribute is also unset, no template has been supplied, and the
  46. factory should use its default template (usually, an empty buffer).
  47. The data type
  48. (<Emphasis>mediaType</Emphasis>) of the
  49. <Emphasis>template</Emphasis> argument should be
  50. <Literal>string</Literal>, unless nulls are valid in the given media type,
  51. in which case the data type must be
  52. <Literal>bytes</Literal>.</Para>
  53. </RefSect1>
  54. <RefSect1>
  55. <Title>APPLICATION USAGE</Title>
  56. <Para>The
  57. &cdeman.ttmedia.ptype.declare; function can be used to register for,
  58. and help process, this message.
  59. </Para>
  60. <Para>This message can be sent with the
  61. &cdeman.ttmedia.load; function.
  62. </Para>
  63. </RefSect1>
  64. <RefSect1>
  65. <Title>EXAMPLES</Title>
  66. <Para>To instantiate an appointment document, the application can send an
  67. <Emphasis>Instantiate</Emphasis> request with a first argument whose vtype is
  68. <Symbol>DT_APPOINTMENT</Symbol>.</Para>
  69. </RefSect1>
  70. <RefSect1>
  71. <Title>ERRORS</Title>
  72. <Para>The ToolTalk service may return one of the following errors
  73. in processing the
  74. <Emphasis>Instantiate</Emphasis> request:
  75. </Para>
  76. <VariableList>
  77. <VarListEntry>
  78. <Term>TT_DESKTOP_ENOENT</Term>
  79. <ListItem>
  80. <Para>The file that was alleged to contain the template does not exist.
  81. </Para>
  82. </ListItem>
  83. </VarListEntry>
  84. <VarListEntry>
  85. <Term>TT_MEDIA_ERR_FORMAT</Term>
  86. <ListItem>
  87. <Para>The template is not a valid instance of the media type.
  88. </Para>
  89. </ListItem>
  90. </VarListEntry>
  91. </VariableList>
  92. </RefSect1>
  93. <RefSect1>
  94. <Title>SEE ALSO</Title>
  95. <Para>&cdeman.ttmedia.ptype.declare;, &cdeman.ttmedia.load;; <Emphasis>Intro</Emphasis>, <Symbol Role="Message">Deposit</Symbol>, <Symbol Role="Message">Edit</Symbol>, <Symbol Role="Message">Status</Symbol> requests.
  96. </Para>
  97. </RefSect1>
  98. </RefEntry>
  99. <!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 01:31:55-->