home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / eiffel / 1322 < prev    next >
Encoding:
Text File  |  1992-11-23  |  2.2 KB  |  79 lines

  1. Newsgroups: comp.lang.eiffel
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!maccs!pkerr
  3. From: pkerr@maccs.dcss.mcmaster.ca (Paul Kerr)
  4. Subject: Need help with small example
  5. Message-ID: <1992Nov23.231649.18236@maccs.dcss.mcmaster.ca>
  6. Organization: Department of Computer Science, McMaster University
  7. Date: Mon, 23 Nov 1992 23:16:49 GMT
  8. Lines: 69
  9.  
  10. Gidday,
  11.  
  12.  I am having a problem with a small example I am trying to write.
  13.  
  14.  What I am trying to create is a HELP class which inherits from the
  15. WINDOW class and adds the features needed to popup a window and display
  16. help text. This HELP class can then be used by any application to present
  17. help to a user.
  18.  
  19.  I havent much so far but what I do have of the help class is presenting
  20. some really wierd errors (I actually lose the connection to the SUN I 
  21. am connected to). Any help would be appreciated muchly!
  22.  
  23. Here is the help window class (called window_demo here)
  24.  
  25. class WINDOW_DEMO
  26. inherit
  27.         WINDOW
  28. feature
  29.  
  30.         win: WINDOW;
  31.  
  32.         Create is
  33.                 do
  34.                         win.Create;
  35.                         win.put_at (5, 5);
  36.                         win.set_width (10);
  37.                         win.set_height (10);
  38.                         win.set_frame;
  39.                         win.display
  40.                 rescue
  41.                         reset_device
  42.                 end; -- Creawin
  43.  
  44. end -- class WINDOW_DEMO
  45.  
  46.  
  47. -----------------------------
  48. Here is the SDF
  49.  
  50. ------------ EIFFEL SYSTEM DESCRIPTION FILE -------------------
  51. --   For simple uses, just replace ``root_class_name'' below
  52. --   by the name of the root class of your system (lower case)
  53. ROOT: window_demo
  54. UNIVERSE: /usr/local/eiffel/Eiffel/library/structures
  55.                          /usr/local/eiffel/Eiffel/library/support
  56.                          /usr/local/eiffel/Eiffel/library/winpack/window
  57.                          /usr/local/eiffel/Eiffel/library/winpack/editor
  58. EXTERNAL: /usr/local/eiffel/Eiffel/files/pack.a -ltermcap
  59. NO_ASSERTION_CHECK (N):
  60. PRECONDITIONS (Y): ALL
  61. ALL_ASSERTIONS (N):
  62. DEBUG (N):
  63. TRACE (N):
  64. OPTIMIZE (N):
  65. GARBAGE_COLLECTION (N)
  66. VIRTUAL_MEMORY (N)
  67. C_PACKAGE (N):
  68. C_EXTERNAL:
  69. MAKE:
  70. VISIBLE (N):
  71.  
  72.  
  73. --------------------------
  74.  
  75. Thanks in advance!
  76. Paul
  77.  
  78.  
  79.