home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / objfac.zip / SYNAPTEC.INF (.txt) < prev    next >
OS/2 Help File  |  1994-03-05  |  15KB  |  422 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Introduction ΓòÉΓòÉΓòÉ
  3.  
  4. Welcome to The Object Factory, the first SOM development tool! 
  5.  
  6. The Object Factory empowers novice and expert SOM developers with a full GUI 
  7. development environment.  The Object Factory is designed to improve the 
  8. productivity of all SOM developers. 
  9.  
  10. Novice SOM developers will be aided in their development through a unique GUI 
  11. interface with comprehensive error checking and on-line help to aid in 
  12. developing SOM classes. 
  13.  
  14. Expert developers will be able to implement classes many times quicker through 
  15. drag-drop class inheritance and double-click overrides of all parent methods! 
  16.  
  17. Even a SOM guru will benefit from the inclusion of undocumented SOM classes and 
  18. methods! 
  19.  
  20. So make more room on your desk by removing those SOM manuals and enjoy SOM 
  21. development with The Object Factory! 
  22.  
  23.  
  24. ΓòÉΓòÉΓòÉ 2. Requirements ΓòÉΓòÉΓòÉ
  25.  
  26. The Object Factory will run on OS/2 2.0 and higher. 
  27.  
  28. Class definition files (*.SC extensions) are required for all SOM classes in 
  29. the class tree.  If you have the SOM 1.0 compiler from the OS/2 2.0 Developer's 
  30. Toolkit, you already have these. 
  31.  
  32. If you ONLY have the SOM 2.0 compiler, these files were not shipped by IBM. 
  33. IBM only included 3 class definitions with the SOM 2.0 compiler -- SOMObject, 
  34. SOMClass, and SOMClassMgr. 
  35.  
  36. If you only have SOM 2.0, you will only be able to successfully subclass 
  37. SOMObject, SOMClass, and SOMClassMgr until you purchase the Developer's 
  38. Toolkit. 
  39.  
  40. The Object Factory is compatible with both SOM 1.0 and 2.0, although some of 
  41. the advanced features of SOM 2.0 are not currently supported, such as multiple 
  42. inheritance.  ALL known features of SOM 1.0 are supported in this version. 
  43.  
  44. A version of The Object Factory with FULL SOM 2.0 support is underway and will 
  45. be available soon! 
  46.  
  47.  
  48. ΓòÉΓòÉΓòÉ 3. Getting Started ΓòÉΓòÉΓòÉ
  49.  
  50. After installation, 2 new templates were created in your system template 
  51. folder.  These templates form the tools used in developing with The Object 
  52. Factory -- a class tree and a class development notebook. 
  53.  
  54. The class tree will be used as a repository for all SOM classes plus ALL newly 
  55. developed classes which you create. 
  56.  
  57. The class development notebook contains ALL information pertaining to a 
  58. particular class which you develop. 
  59.  
  60. Copy these templates anywhere you wish by holding CTRL while dragging a 
  61. template to its new location. 
  62.  
  63.  
  64. ΓòÉΓòÉΓòÉ 4. The Class Tree ΓòÉΓòÉΓòÉ
  65.  
  66. The class tree is a repository of all SOM classes plus any classes defined by 
  67. you. 
  68.  
  69.  
  70. ΓòÉΓòÉΓòÉ 4.1. Creating a Class Tree ΓòÉΓòÉΓòÉ
  71.  
  72. The class tree template is used to create new instances of class trees.  To do 
  73. this, drag a tree from the template to a location on your desktop. 
  74.  
  75. You may create as many class trees as you wish simply by dragging a new 
  76. template on to the desktop, or any other work area you might have. 
  77.  
  78.  
  79. ΓòÉΓòÉΓòÉ 4.2. Working with a Class Tree ΓòÉΓòÉΓòÉ
  80.  
  81. To use a class tree, drag class development notebooks to a position within the 
  82. tree.  The class on which you drop your new class becomes the parent class of 
  83. the dropped object. 
  84.  
  85. If you need to move a class notebook from one parent to another,  just drag the 
  86. notebook to the desired parent.  You can move class notebooks from parent to 
  87. parent as much as you like. 
  88.  
  89. When moving a compiled class to a new parent, remember that previously 
  90. overridden methods may possibly not be inherited from the new parent! 
  91.  
  92. Information about SOM classes may be accessed by double-clicking on the SOM 
  93. class about which you would like help.  Use this information to select the most 
  94. appropriate parent for your new class. 
  95.  
  96.  
  97. ΓòÉΓòÉΓòÉ 4.3. Working with Multiple Class Trees ΓòÉΓòÉΓòÉ
  98.  
  99. You are not bound to a single class tree -- you may wish to have a tree for 
  100. each development project.  You are free to create as many trees as you desire. 
  101.  
  102. New classes are not restricted to a particular class tree.  Classes may be 
  103. moved or copied among various class trees. 
  104.  
  105. By copying new classes, you may wish to reserve 1 class tree to act as a global 
  106. class repository and use other trees for local projects. 
  107.  
  108.  
  109. ΓòÉΓòÉΓòÉ 4.4. Modifying the Appearance and Window Behavior ΓòÉΓòÉΓòÉ
  110.  
  111. The appearance and window behavior of a particular class tree may be modified 
  112. via the "Settings" notebook. 
  113.  
  114. The settings notebook pages operate exactly as they do for other system 
  115. objects. 
  116.  
  117.  
  118. ΓòÉΓòÉΓòÉ 4.5. Deleting a Class Tree ΓòÉΓòÉΓòÉ
  119.  
  120. Prior to deleting a class tree, the tree should be scanned to ensure NO new 
  121. classes which you wish to keep are inside.  Move classes you wish to keep to 
  122. another class tree. 
  123.  
  124. To delete a class tree, select "Delete" from the class tree's system menu. 
  125.  
  126. If you choose to delete a class tree, a confirmation box will appear to remind 
  127. you to remove new classes you wish to keep and allow you to abort the delete. 
  128.  
  129.  
  130. ΓòÉΓòÉΓòÉ 5. The Class Notebook ΓòÉΓòÉΓòÉ
  131.  
  132. The class notebook is where you develop your new class.  All information 
  133. pertaining to your new class is contained within the class notebook. 
  134.  
  135.  
  136. ΓòÉΓòÉΓòÉ 5.1. Creating a Class Notebook ΓòÉΓòÉΓòÉ
  137.  
  138. The class notebook template is used to create new instances of class notebooks. 
  139. Simply drag a notebook from the template to a location of your choosing and you 
  140. have just created a new class notebook. 
  141.  
  142. Until you place a notebook in a class tree,  you do not have a notebook which 
  143. can be compiled. 
  144.  
  145. You may create as many class notebooks as you desire. 
  146.  
  147.  
  148. ΓòÉΓòÉΓòÉ 5.2. Working with a Class Notebook ΓòÉΓòÉΓòÉ
  149.  
  150. Double-click on a class notebook to access the information associated with the 
  151. class. 
  152.  
  153. If this is a new class and you have dropped it in the class tree, some of the 
  154. fields will be automatically filled in for you.  For instance, the parent and 
  155. inherited methods are known and subsequently filled in for you. 
  156.  
  157. Fill in the required sections of the notebook, plus any of the optional 
  158. sections you desire your class to have.  Each page of the notebook has 
  159. comprehensive help available. 
  160.  
  161. When you are ready to compile the class, select "Compile" from the notebook's 
  162. system menu.  Any compilation errors will be displayed. 
  163.  
  164. If the class compiles correctly, you are ready to modify the emitted stub file 
  165. and implement the class. 
  166.  
  167.  
  168. ΓòÉΓòÉΓòÉ 5.3. Deleting a Class Notebook ΓòÉΓòÉΓòÉ
  169.  
  170. To delete a class notebook, select "Delete" from the class notebook's system 
  171. menu. 
  172.  
  173. If you have system delete confirmations turned on, a confirmation box will 
  174. appear to allow you to abort the delete. 
  175.  
  176. Deleting a class notebook will not delete any emitted files which were created 
  177. by the notebook. 
  178.  
  179.  
  180. ΓòÉΓòÉΓòÉ 6. SOM Development Hints ΓòÉΓòÉΓòÉ
  181.  
  182. SOM development can be frustrating due to the lack of published information. 
  183. We have included for you solutions to some of the common pitfalls associated 
  184. with implementing new SOM classes. 
  185.  
  186.  
  187. ΓòÉΓòÉΓòÉ 6.1. Instance and Class Methods ΓòÉΓòÉΓòÉ
  188.  
  189. Within the emitted C/C++ file created by SOM, the ordering of instance and 
  190. class methods is important.  Normally, instance methods appear at the top of 
  191. the file and class methods appear at the bottom of the file. 
  192.  
  193. Also, the macro SOM_CurrentClass must be defined as SOMMeta between the two 
  194. sections. 
  195.  
  196. The following code shows how the file should look if you overrode the wpSetup 
  197. and wpclsQueryTitle methods: 
  198.  
  199. SOM_Scope BOOL  SOMLINK SOMNtbk_wpSetup(SOMNotebook *somSelf, PSZ pszSetupString)
  200. {
  201. return (parent_wpSetup(somSelf,pszSetupString));
  202. }
  203.  
  204. #undef SOM_CurrentClass
  205. #define SOM_CurrentClass SOMMeta
  206.  
  207. SOM_Scope PSZ   SOMLINK SOMNtbkcls_wpclsQueryTitle(M_SOMNotebook *somSelf)
  208. {
  209. return (parent_wpclsQueryTitle(somSelf));
  210. }
  211.  
  212. If you later override or add new instance methods, they must appear above the 
  213. SOM_CurrentClass definition. 
  214.  
  215. SOM 1.0 always appends to the bottom of the file, so you must move instance 
  216. methods above the SOM_CurrentClass definition! 
  217.  
  218. SOM 2.0 correctly places methods, but forgets to add the definition of 
  219. SOM_CurrentClass to the file!.  If you are using SOM 2.0, you should add the 
  220. definition of SOM_CurrentClass in the correct position in the emitted C/C++ 
  221. file yourself!! 
  222.  
  223.  
  224. ΓòÉΓòÉΓòÉ 6.2. Compiler Settings ΓòÉΓòÉΓòÉ
  225.  
  226. To implement your SOM class as a WPS object, you must create a DLL.  To do 
  227. this, set your C compiler to generate an OS/2 multithreaded DLL. 
  228.  
  229. Also, SOM uses the STANDARD calling convention, not "C".  Set your compiler's 
  230. calling convention to STANDARD when compiling SOM DLL's. 
  231.  
  232.  
  233. ΓòÉΓòÉΓòÉ 6.3. Borland C++ V1.0 ΓòÉΓòÉΓòÉ
  234.  
  235. In order to correctly initialize your DLL, you must add the following line to 
  236. the top of your emitted C/C++ file: 
  237.  
  238. extern int _multidll = 0; 
  239.  
  240. This global variable is documented in the README file shipped with Borland C++. 
  241.  
  242. If you are using SOM 2.0 with Borland C++, examine the README shipped with SOM 
  243. 2.0 VERY closely.  You will find a requirement that SOMLINK must be defined as 
  244. _syscall. 
  245.  
  246. Instead of defining SOMLINK on the SOM command line as README suggests, it is 
  247. easier to change SOMLINK in file "\SOM\INCLUDE\SOMLTYPE.H" to "_syscall". 
  248.  
  249.  
  250. ΓòÉΓòÉΓòÉ 6.4. Variable Name Lengths ΓòÉΓòÉΓòÉ
  251.  
  252. SOM generates extremely long variable names within its binding files.  This can 
  253. cause compilation errors if you have your C compiler's identifier lengths set 
  254. too short.  The default for some C compilers is 32 characters. 
  255.  
  256. We suggest setting your C compiler's identifier lengths to at least 100 
  257. characters to satisfy the SOM bindings. 
  258.  
  259.  
  260. ΓòÉΓòÉΓòÉ 6.5. Include files ΓòÉΓòÉΓòÉ
  261.  
  262. You should add the following lines to either the top of your emitted C/C++ file 
  263. or the PASSTHRU *.IH page in the class notebook. 
  264.  
  265. #define INCL_WIN
  266. #define INCL_DOS
  267. #define INCL_WINWORKPLACE
  268. #define INCL_WPCLASS
  269. #include <os2.h>
  270.  
  271. These lines satisfy requirements imposed by the SOM binding files. 
  272.  
  273.  
  274. ΓòÉΓòÉΓòÉ 6.6. DLL Definition File ΓòÉΓòÉΓòÉ
  275.  
  276. The emitted DEF file produced by SOM may be incorrect if you are compiling 
  277. using prepended underscores to access your C run-time libraries.  For example, 
  278. given the following DEF file: 
  279.  
  280. ; This file was generated by the SOM Compiler.
  281. ;  FileName: ClssNote.def.
  282. ;  Generated using:
  283. ;    SOM Precompiler spc: 1.22
  284. ;    SOM Emitter emitdef: 1.13
  285. LIBRARY ClassNote INITINSTANCE
  286. DESCRIPTION 'ClassNotebook Class Library'
  287. PROTMODE
  288. DATA MULTIPLE NONSHARED LOADONCALL
  289. EXPORTS
  290.   MyClassNameCClassData
  291.   MyClassNameClassData
  292.   MyClassNameNewClass
  293.   M_MyClassNameCClassData
  294.   M_MyClassNameClassData
  295.   M_MyClassNameNewClass
  296.  
  297. If you are compiling with prepended underscores turned ON, change the DEF file 
  298. to: 
  299.  
  300. ; This file was generated by the SOM Compiler.
  301. ;  FileName: ClssNote.def.
  302. ;  Generated using:
  303. ;    SOM Precompiler spc: 1.22
  304. ;    SOM Emitter emitdef: 1.13
  305. LIBRARY ClassNote INITINSTANCE
  306. DESCRIPTION 'ClassNotebook Class Library'
  307. PROTMODE
  308. DATA MULTIPLE NONSHARED LOADONCALL
  309. EXPORTS
  310.   _MyClassNameCClassData
  311.   _MyClassNameClassData
  312.   MyClassNameNewClass
  313.   _M_MyClassNameCClassData
  314.   _M_MyClassNameClassData
  315.   M_MyClassNameNewClass
  316.  
  317.  
  318. ΓòÉΓòÉΓòÉ 6.7. Linking ΓòÉΓòÉΓòÉ
  319.  
  320. During the linking of your class objects using your C compiler, you may receive 
  321. errors.  Depending on which version of OS2.LIB you have, some classes will not 
  322. link correctly.  These problems are not due to The Object Factory. 
  323.  
  324. For example, the OS2.LIB shipped with Borland's C++ V1.0 is missing references 
  325. for 16 SOM classes.  OS2386.LIB, on the other hand, is only missing 5. 
  326.  
  327. The Object Factory was designed totally against the SOM class definition files. 
  328. This is why the WPJob class appears as "JO" -- IBM's documentation does not 
  329. match the class definition file. 
  330.  
  331. If you have any compile or link errors, please be sure to check your OS2.LIB 
  332. version and your compiler's INCLUDE path. 
  333.  
  334.  
  335. ΓòÉΓòÉΓòÉ 7. Backup Procedures ΓòÉΓòÉΓòÉ
  336.  
  337. The Object Factory was created using SOM and is now part of your operating 
  338. system.  As such, it is important that you periodically save copies of your 
  339. desktop. 
  340.  
  341. Failure to backup your desktop WILL result in the loss of information contained 
  342. in your class trees and class notebooks. 
  343.  
  344. Follow the normal backup procedures for your desktop contained in your OS/2 
  345. documentation.  At a minimum, you should issue a BACKUP command on all your 
  346. desktop directories AND save copies of OS2.INI and OS2SYS.INI. 
  347.  
  348. The above instructions are not meant to be complete nor entirely accurate for 
  349. your machine.  Read your OS/2 documentation for precise instructions on 
  350. saving/restoring your desktop information. 
  351.  
  352.  
  353. ΓòÉΓòÉΓòÉ 8. Product Registration ΓòÉΓòÉΓòÉ
  354.  
  355. If you would like to receive information on future products from Synaptec, 
  356. please print the next page, fill in the requested information, and return via 
  357. mail. 
  358.  
  359.  
  360. ΓòÉΓòÉΓòÉ 8.1. Registration Card ΓòÉΓòÉΓòÉ
  361.  
  362.                                The Object Factory
  363.                                 Registration Card
  364.  
  365.  
  366. Name    ____________________________________
  367. Company ____________________________________
  368. Address ____________________________________
  369. City    ____________________________________
  370. State   ____________________________________
  371. Zip     ____________________________________
  372. Phone   ____________________________________
  373. FAX     ____________________________________
  374.  
  375. Please mail your completed registration card to: 
  376.  
  377.                                  Synaptec, Inc.
  378.                              5085 Forest View Trail
  379.                              Douglasville, GA 30135
  380.  
  381.  
  382. ΓòÉΓòÉΓòÉ 9. Contacting Synaptec ΓòÉΓòÉΓòÉ
  383.  
  384. We at Synaptec hope that this tool makes your SOM development easier and 
  385. enjoyable. 
  386.  
  387. We appreciate your business and pledge to provide any assistance you may need 
  388. in using The Object Factory. 
  389.  
  390. If you need assistance in using The Object Factory, or experience problems, you 
  391. can contact Synaptec at: 
  392.  
  393.  
  394.                              (404) 942-8699  9-5 EST
  395.  
  396.  
  397. We will assist you as efficiently as possible. 
  398.  
  399. Due to the complexity of SOM development, we ask that all questions be directly 
  400. related to usage of The Object Factory -- we cannot answer questions concerning 
  401. implementing your classes. 
  402.  
  403.  
  404. ΓòÉΓòÉΓòÉ 10. Legalities ΓòÉΓòÉΓòÉ
  405.  
  406. This section contains trademark and copyright information. 
  407.  
  408.  
  409. ΓòÉΓòÉΓòÉ 10.1. Trademarks ΓòÉΓòÉΓòÉ
  410.  
  411. "The Object Factory" and "Synaptec" are trademarks of Synaptec, Inc. 
  412.  
  413. "Borland" and "Borland C++ V1.0" are registered trademarks of Borland 
  414. International, Inc. 
  415.  
  416. "IBM", "OS/2", "SOM", "Workplace Shell", and "Developer's Toolkit" are all 
  417. registered trademarks of International Business Machines Corporation. 
  418.  
  419.  
  420. ΓòÉΓòÉΓòÉ 10.2. Copyright ΓòÉΓòÉΓòÉ
  421.  
  422. Copyright 1994, Synaptec, Inc.  All rights reserved.