home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / SOMINF.ZIP / TENSTEPS.INF (.txt) < prev    next >
OS/2 Help File  |  1992-07-15  |  3KB  |  91 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Design Your Object ΓòÉΓòÉΓòÉ
  3.  
  4. The most critical step is design. 
  5.  
  6. Considerations: 
  7.  
  8. o User Interface 
  9.  
  10. o Interfaces to Other Objects 
  11.  
  12. o Communications Support 
  13.  
  14. o Background Processing 
  15.  
  16. o Integration into the Shell 
  17.  
  18.  
  19. ΓòÉΓòÉΓòÉ 2. Design Its Views ΓòÉΓòÉΓòÉ
  20.  
  21. This step concemtrates on the user interface. It also could directly influence 
  22. the next step, as the parent chosen may have some of the necessary views 
  23. defined already. 
  24.  
  25.  
  26. ΓòÉΓòÉΓòÉ 3. Choose a Parent Class for Subclassing ΓòÉΓòÉΓòÉ
  27.  
  28. The parent is the predefined Workplace class (or previous subclass) which is 
  29. most like your design. 
  30.  
  31. Much of the object's behavior may already be defined by the parent's methods. 
  32.  
  33.  
  34. ΓòÉΓòÉΓòÉ 4. Create the Object's Class Definition ΓòÉΓòÉΓòÉ
  35.  
  36. Write the object definition in OIDL, specifying the parent class you chose. 
  37.  
  38.  
  39. ΓòÉΓòÉΓòÉ 5. Compile the Class Definition ΓòÉΓòÉΓòÉ
  40.  
  41. Use the SOM compiler to output your public definitions, and all the skeleton 
  42. code to produce your object. 
  43.  
  44.  
  45. ΓòÉΓòÉΓòÉ 6. Add Object-specific code ΓòÉΓòÉΓòÉ
  46.  
  47. Modify the SOM output to actually do the work. Add user- specific routines if 
  48. necessary. 
  49.  
  50. Make sure the .DEF file exports all of the dialog box or window routines. 
  51.  
  52. Note:  If you regenerate the .DEF file with the SOM compiler, you will have to 
  53.        add these routines in the .DEF again. 
  54.  
  55.  
  56. ΓòÉΓòÉΓòÉ 7. Compile & Link The Object ΓòÉΓòÉΓòÉ
  57.  
  58. Use C Set/2 from the command line, or under Workframe/2. 
  59.  
  60.  
  61. ΓòÉΓòÉΓòÉ 8. Register The Object with the WPS ΓòÉΓòÉΓòÉ
  62.  
  63. Select one of the methods of registration. For an installation program, you 
  64. will need to write your own code, in 'C' or Rexx. 
  65.  
  66. Language                      API 
  67.  
  68. Rexx                          SysRegisterObjectClass() 
  69.  
  70. User-written program          Call WinRegisterObjectClass() 
  71.  
  72. OS/2 Toolkit ClassList        Follow the pop-up menus 
  73.  
  74.  
  75. ΓòÉΓòÉΓòÉ 9. Instantiate The Object ΓòÉΓòÉΓòÉ
  76.  
  77. Select one of the methods of instantiation. For an installation program, you 
  78. will need to write your own code, in 'C' or Rexx. 
  79.  
  80. Language                      API 
  81.  
  82. Rexx                          SysCreateObject() 
  83.  
  84. User-written program          Call WinCreateObject() 
  85.  
  86. OS/2 Toolkit ClassList        Follow the pop-up menus 
  87.  
  88.  
  89. ΓòÉΓòÉΓòÉ 10. Test and Iterate ΓòÉΓòÉΓòÉ
  90.  
  91. Select the object from the desktop, and test.