home *** CD-ROM | disk | FTP | other *** search
/ Altsys Virtuoso 2.0K / virtuoso_20k.iso / NeXTanswers / OpenStepSpec_rtf / OpenStepIntro.rtfd / TXT.rtf < prev   
Encoding:
Text File  |  1994-07-01  |  13.3 KB  |  188 lines

  1. {\rtf0\ansi\paperw16228 \paperh18648 \margl-907 \margr0 \margt0 \margb0 {\fonttbl\f0\fswiss Helvetica;\f1\froman Times;\f2\fmodern Courier;\f3\ftech Symbol;\f4\froman Palatino;}
  2. {\stylesheet{\s0 \li100 \fi0 \ri1007 \ql   1Head;}
  3. {\s1 \li100 \fi0 \ri1007 \ql   1Head-SkipTOC;}
  4. {\s2 \li2116 \fi0 \ri1007 \ql   2Head;}
  5. {\s3 \li2116 \fi0 \ri1007 \ql   2Head-SkipTOC;}
  6. {\s4 \li2116 \fi0 \ri1007 \ql   3Head;}
  7. {\s5 \li2493 \fi0 \ri1007 \ql   3HeadIn;}
  8. {\s6 \li2116 \fi0 \ri1007 \ql   4Head;}
  9. {\s7 \li2116 \fi0 \ri1007 \ql \tx2494 \tx2872 \tx3250   Body;}
  10. {\s8 \li2494 \fi0 \ri1007 \ql \tx2872 \tx3250 \tx3642   BodyIndented;}
  11. {\s9 \li2872 \fi0 \ri1007 \ql \tx3249 \tx3642   BodyIndented2;}
  12. {\s10 \li2494 \fi-378 \ri1007 \ql \tx2494 \tx2872 \tx3250   BulletLong;}
  13. {\s11 \li2494 \fi-378 \ri1007 \ql   BulletShort;}
  14. {\s12 \li0 \fi0 \ri0 \ql   Callout;}
  15. {\s13 \li0 \fi0 \ri0 \ql   CellBody;}
  16. {\s14 \li0 \fi0 \ri0 \qc   CellHeading;}
  17. {\s15 \li2116 \fi0 \ri1007 \ql   ChapterNum;}
  18. {\s16 \li2116 \fi0 \ri1007 \ql   ChapterTitle;}
  19. {\s17 \li2494 \fi0 \ri1007 \ql   CodeExamp;}
  20. {\s18 \li2872 \fi0 \ri1007 \ql   CodeExamp2;}
  21. {\s19 \li6652 \fi0 \ri1007 \ql   CodeExamp2In;}
  22. {\s20 \li2923 \fi-806 \ri1007 \ql \tx2923   Definition;}
  23. {\s21 \li2116 \fi0 \ri1007 \ql   Fig1Caption;}
  24. {\s22 \li2116 \fi0 \ri1007 \ql   FigCaption;}
  25. {\s23 \li0 \fi0 \ri0 \ql   Figure;}
  26. {\s24 \li0 \fi0 \ri0 \ql \tx-25 \tx9172   Footer;}
  27. {\s25 \li0 \fi0 \ri0 \ql \tx-278 \tx5644 \tx12196   FooterLeft;}
  28. {\s26 \li0 \fi0 \ri0 \ql \tx11565 \tx12196   FooterRight;}
  29. {\s27 \li0 \fi0 \ri503 \ql   Footnote;}
  30. {\s28 \li0 \fi0 \ri0 \ql   Heading;}
  31. {\s29 \li2923 \fi-806 \ri1007 \ql \tx2923   Indent;}
  32. {\s30 \li2923 \fi0 \ri1007 \ql   IndentUsage;}
  33. {\s31 \li2872 \fi0 \ri1007 \ql   Method2;}
  34. {\s32 \li3251 \fi0 \ri1007 \ql   MethodDesc2;}
  35. {\s33 \li2116 \fi0 \ri1007 \ql   Note;}
  36. {\s34 \li2872 \fi0 \ri1007 \ql \tx2494 \tx2872 \tx3250   SeeAlso2;}
  37. {\s35 \li4384 \fi-2268 \ri1007 \ql \tx4005 \tx4384   Summary;}
  38. {\s36 \li2494 \fi0 \ri1007 \ql \tx6148 \tx10180   TableBody1;}
  39. {\s37 \li6148 \fi-3654 \ri1007 \ql \tx6148 \tx10432   TableBody2;}
  40. {\s38 \li6652 \fi-4159 \ri1007 \ql \tx6652   TableBody2In;}
  41. {\s39 \li0 \fi0 \ri503 \ql   TableFootnote;}
  42. {\s40 \li2493 \fi0 \ri1007 \ql \tx6148 \tx10180   TableHead;}
  43. {\s41 \li5392 \fi-2520 \ri1007 \ql \tx5392   TableIndented2;}
  44. {\s42 \li0 \fi0 \ri0 \qc   TableTitle;}
  45. {\s43 \li2116 \fi-503 \ri1007 \ql   Term;}
  46. {\s44 \li2116 \fi0 \ri1007 \ql   Tip;}
  47. {\s45 \li0 \fi0 \ri1007 \ql   Title;}
  48. {\s46 \li2116 \fi0 \ri1007 \ql   Usage;}
  49. {\s47 \li2116 \fi-2015 \ri1007 \ql \tx693 \tx2116   Warning;}
  50. }
  51. \li0 \fi0 \ri0 \ql \sb0 \f1 \fs24 
  52. (Preliminary Documentation) Copyright \f3 \'e3\f1 1994 by NeXT Computer, Inc.  All Rights Reserved.\
  53. \
  54. \pard \s7 \li2116 \fi0 \ri1007 \ql \tx2494 \tx2872 \tx3250 \f1 \fs28 \fs16 \
  55. \fs28 \
  56. \fs16 \
  57. \fs28 \fs16 \fs28 \
  58. \fs16 \
  59. \fs28 \pard \s45 \li0 \fi0 \ri1007 \ql \i \fs88 \fs16 \fs88 Introduction\
  60. \fs16 \
  61. \
  62. \
  63. \
  64. \
  65. \
  66. \
  67. \
  68. \fs88 \pard \s7 \li2116 \fi0 \ri1007 \ql \tx2494 \tx2872 \tx3250 \i0 \fs28 \fs16 \fs28 This document describes the application programming interface (API) of OpenStep\f3 \fs18 \up6 \'e4\f1 \fs28 \up0. OpenStep is an operating system independent, object-oriented application layer, based on NeXT\'27s advanced object technology.  OpenStep contains these major components:\
  69. \fs16 \
  70. \fs28 \s23 \li0 \fi3024 \fi0 \ri0 \fs16 \
  71. \
  72. \fs28 \
  73. {\li2131\ri0{\NeXTGraphic0 F0.eps \width7307 \height5123 
  74. },}
  75. \
  76. \fs16 \
  77. \fs28 \s21 \li2116 \fi-3024 \fi0 \ri1007 \fs16 \fs28 \f0 \b \fs28 Figure 1\b0 \fs28 \f1 .  Major Components of OpenStep\
  78. \fs16 \
  79. \
  80. \
  81. \fs28 \pard \s37 \li6148 \fi-3654 \ri1007 \ql \tx6148 \tx10432 \b Application Kit\b0     The Application Kit\f3 \fs18 \up6 \'e4\f1 \fs28 \up0 provides the basic software for writing interactive applications\'d0applications that use windows, draw on the screen, and respond to user actions on the keyboard and mouse. The Application Kit contains the components that define the OpenStep user interface.\
  82. \fs16 \
  83. \fs28 \b Foundation Kit\b0     The Foundation Kit\f3 \fs18 \up6 \'e4\f1 \fs28 \up0 provides the fundamental building blocks that applications use to manage data and resources. It defines facilities for handling multibyte character sets, object persistency and distribution, and provides an interface to common operating system facilities. \
  84. \fs16 \
  85. \fs28 \b Display PostScript System\b0     The Display PostScript\f3 \fs18 \up6 \'e2\f1 \fs28 \up0 system provides OpenStep with its device-independent imaging model.\
  86. \fs16 \
  87. \fs28 \pard \s1 \li100 \fi0 \ri1007 \ql \f0 \b \fs52 \fs16 \
  88. \
  89. \
  90. \
  91. \
  92. \fs52 How this Document is Organized\
  93. \fs16 \
  94. \
  95. \fs52 \pard \s7 \li2116 \fi0 \ri1007 \ql \tx2494 \tx2872 \tx3250 \f1 \b0 \fs28 \fs16 \fs28 The three components of OpenStep are described in the three chapters of this document, starting with Chapter 1, \'aaThe Application Kit\'ba. Each chapter is organized in the same way, having these standard sections:\
  96. \fs16 \
  97. \fs28 \s3 \f0 \b \fs48 \fs16 \
  98. \
  99. \
  100. \
  101. \fs48 Classes\
  102. \fs16 \
  103. \fs48 \pard \s7 \li2116 \fi0 \ri1007 \ql \tx2494 \tx2872 \tx3250 \f1 \b0 \fs28 \fs16 \fs28 This section lists the API for each class defined in the component. For each class, these sections may appear:\
  104. \fs16 \
  105. \fs28 \pard \s37 \li6148 \fi-3654 \ri1007 \ql \tx6148 \tx10432 \fi-3655 \f0 \b \fs28 Inherits From:\f1 \b0 \fs28     The inheritance hierarchy for the class.  For example:\
  106. \fs16 \
  107. \fs28 \pard \s38 \li6652 \fi-4159 \ri1007 \ql \tx6652     NSPanel  :  NSWindow  :  NSResponder  :  NSObject\
  108. \fs16 \
  109. \fs28 \pard \s37 \li6148 \fi-3654 \ri1007 \ql \tx6148 \tx10432     The first class listed (NSPanel, in this example) is the class\'27s superclass.  The last class listed is generally NSObject, the root of almost all OpenStep inheritance hierarchies.  The classes between show the chain of inheritance from NSObject to the superclass.  (This particular example shows the inheritance hierarchy for the NSMenu class of the Application Kit.)\
  110. \fs16 \
  111. \fs28 \fi-3655 \f0 \b \fs28 Conforms To:\f1 \b0 \fs28     The formal protocols that the class conforms to.  These include both protocols the class adopts and those it inherits from other adopting classes.  If inherited, the name of the adopting class in given in parentheses.  For example:\
  112. \fs16 \
  113. \fs28 \pard \s38 \li6652 \fi-4159 \ri1007 \ql \tx6652     NSCopying\
  114. \fi0 NSMutableCopying\
  115. \fi0 NSObject (NSObject)\
  116. \fs16 \
  117. \fs28 \pard \s37 \li6148 \fi-3654 \ri1007 \ql \tx6148 \tx10432     (This particular example is from the NSArray class in the Foundation Kit.)\
  118. \fs16 \
  119. \fs28 \f0 \b \fs28 Declared In:\f1 \b0 \fs28     The header file that declares the class interface.  For example:\
  120. \fs16 \
  121. \fs28 \pard \s38 \li6652 \fi-4159 \ri1007 \ql \tx6652     foundation/NSString.h\
  122. \fs16 \
  123. \fs28 \pard \s37 \li6148 \fi-3654 \ri1007 \ql \tx6148 \tx10432     (This example is from the NSString class, which is declared in the \b foundation\b0  subdirectory of \b /OpenStep/Headers\b0 .)  \
  124. \fs16 \
  125. \fs28 \pard \s7 \li2116 \fi0 \ri1007 \ql \tx2494 \tx2872 \tx3250 \fs16 \fs28 Next, the methods the class declares and implements are listed by name and grouped by type.  For example, methods used to draw are listed separately from methods used to handle events.  This listing includes all the methods declared in the class.  It also may include a method declared in a  protocol the class conforms to, if there is something extraordinary about the class\'27s implementation of the method.  Each method is accompanied by a brief description which states what the method does and mentions the arguments and return value, if any.\
  126. \fs16 \
  127. \fs28 \fs16 \fs28 If a class lets you define another object\'d0a delegate\'d0that can intercede on behalf of instances of the class, the methods that the delegate can implement are described in a separate section.  These are not methods defined in the class; rather, they\'27re methods that you can define to respond to messages sent from instances of the class. In essence, this section documents an informal protocol.  But because these methods are so closely tied to the behavior of a particular class, they\'27re documented with the class rather than in the \'aaProtocols\'ba section.  \
  128. \fs16 \
  129. \fs28 \fs16 \fs28 Some class specifications have separate sections with titles such as \'aaMethods Implemented by the Superview\'ba, \'aaMethods Implemented by Observers\'ba, or \'aaMethods Implemented by the Owner.\'ba  These are also informal protocols.  They document methods that can or must be implemented to receive messages on behalf of instances of the class.\
  130. \fs16 \
  131. \fs28 \pard \s3 \li2116 \fi0 \ri1007 \ql \f0 \b \fs48 \fs16 \
  132. \
  133. \
  134. \
  135. \fs48 Protocols\
  136. \fs16 \
  137. \fs48 \pard \s7 \li2116 \fi0 \ri1007 \ql \tx2494 \tx2872 \tx3250 \f1 \b0 \fs28 \fs16 \fs28 The protocols section documents both formal and informal protocols.  Formal protocols are those that are declared using the \b @protocol\b0  compiler directive.  They can be formally adopted and implemented by a class and tested by sending an object a \b conformsToProtocol:\b0  message.\
  138. \fs16 \
  139. \fs28 \fs16 \fs28 Some formal protocols are adopted and implemented by OpenStep classes.  However, many formal protocols are declared by a kit, but not implemented by it.  They list methods that you can implement to respond to kit-generated messages.\
  140. \fs16 \
  141. \fs28 \fs16 \fs28 A few formal protocols are implemented by a kit, but not by a class that\'27s part of the documented API.  Rather, the protocol is implemented by an anonymous object that the kit supplies.  The protocol lets you know what messages you can send to the object.\
  142. \fs16 \
  143. \fs28 \fs16 \fs28 Like formal protocols, informal protocols declare a list of methods that others are invited to implement.  If an informal protocol is closely associated with one particular class\'d0for example, the list of methods implemented by the delegate\'d0it\'27s documented in the class description.  Informal protocols associated with more than one class, or not associated with any particular class, are documented with the formal protocols in this section.\
  144. \fs16 \
  145. \fs28 \fs16 \fs28 Protocol information is organized into many of the same sections as described above for a class specification.  But protocols are not classes and therefore differ somewhat in the kind of information provided.  The sections of a protocol specification are shown in bold below:\
  146. \fs16 \
  147. \fs28 \pard \s37 \li6148 \fi-3654 \ri1007 \ql \tx6148 \tx10432 \fi-3655 \f0 \b \fs28 Adopted By:\f1 \b0 \fs28     A list of the OpenStep classes that adopt the protocol.  Many protocols declare methods that applications must implement and so are not adopted by any OpenStep classes.\
  148. \fs16 \
  149. \fs28 \pard \s37 \li6148 \fi-3654 \ri1007 \ql \tx6148 \tx10432 \fi-3655     Some protocols are implemented by anonymous objects (instances of an unknown class); the protocol is the only information available about what messages the object can respond to.  Protocols that have an implementation available through an anonymous object generally don\'27t have to be reimplemented by other classes.\
  150. \fs16 \
  151. \fs28 \pard \s37 \li6148 \fi-3654 \ri1007 \ql \tx6148 \tx10432 \fi-3655 \f0 \b \fs28 Incorporates:\f1 \b0 \fs28     Other protocols that the protocol being described incorporates by reference.  One protocol incorporates others by listing them within angle brackets:\
  152. \fs16 \
  153. \fs28 \s19 \li6652 \fi-4159 \fi0 \f2 \fs24 @protocol biathlon <skiing, shooting>\
  154. \pard \s37 \li6148 \fi-3654 \ri1007 \ql \tx6148 \tx10432 \f1 \fs28 \fi-3655 \fs16 \
  155. \fs28     The protocol specification doesn\'27t describe methods declared in incorporated protocols.  See the specification for the incorporated protocol for a description of its methods.\
  156. \fs16 \
  157. \fs28 \pard \s7 \li2116 \fi0 \ri1007 \ql \tx2494 \tx2872 \tx3250 \fs16 \fs28 An informal protocol can\'27t be formally adopted by a class and it can\'27t formally incorporate another protocol.  So its description begins with information about the category where it\'27s declared:\
  158. \fs16 \
  159. \fs28 \pard \s37 \li6148 \fi-3654 \ri1007 \ql \tx6148 \tx10432 \f0 \b \fs28 Category Of:\f1 \b0 \fs28     The class that the category belongs to.  Informal protocols are typically declared as categories of the NSObject class.  This gives them the widest possible scope.\
  160. \fs16 \
  161. \fs28 \pard \s7 \li2116 \fi0 \ri1007 \ql \tx2494 \tx2872 \tx3250 \fs16 \fs28 Both formal and informal protocols include a cross reference to a header file in \b /OpenStep/Headers\b0 : \
  162. \fs16 \
  163. \fs28 \pard \s37 \li6148 \fi-3654 \ri1007 \ql \tx6148 \tx10432 \f0 \b \fs28 Declared In:\f1 \b0 \fs28     The header file where the protocol is declared.\
  164. \fs16 \
  165. \fs28 \pard \s7 \li2116 \fi0 \ri1007 \ql \tx2494 \tx2872 \tx3250 \fs16 \fs28 If the protocol includes enough methods to warrant it, they\'27re divided by type and presented just as the methods of a class are.\
  166. \fs16 \
  167. \fs28 \pard \s3 \li2116 \fi0 \ri1007 \ql \f0 \b \fs48 \fs16 \
  168. \
  169. \
  170. \
  171. \fs48 Functions\
  172. \fs16 \
  173. \fs48 \pard \s7 \li2116 \fi0 \ri1007 \ql \tx2494 \tx2872 \tx3250 \f1 \b0 \fs28 \fs16 \fs28 Related functions are grouped together under a heading that describes the common purpose.  Each function, its arguments, and its return value are briefly described in an accompanying comment.  \
  174. \fs16 \
  175. \fs28 \pard \s3 \li2116 \fi0 \ri1007 \ql \f0 \b \fs48 \fs16 \
  176. \
  177. \
  178. \
  179. \fs48 Types and Constants\
  180. \fs16 \
  181. \fs48 \pard \s7 \li2116 \fi0 \ri1007 \ql \tx2494 \tx2872 \tx3250 \f1 \b0 \fs28 \fs16 \fs28 Related defined types, enumeration constants, symbolic constants, structures, and global variables are grouped together under a heading that describes the common purpose.  A short description accompanies each group.\
  182. \fs16 \
  183. \fs28 \fs16 \fs28 \
  184. \fs16 \
  185. \fs28 \fs16 \fs28 \
  186. \fs16 \
  187. \fs28 }
  188.