home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / next / programm / 5161 < prev    next >
Encoding:
Internet Message Format  |  1992-07-21  |  1.8 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!data.nas.nasa.gov!news
  2. From: makarewy@rft31.nas.nasa.gov (Alex Makarewycz)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: How can one initialize "FormCell" to arbitrary values ??
  5. Keywords: initialize default
  6. Message-ID: <1992Jul22.004307.579@nas.nasa.gov>
  7. Date: 22 Jul 92 00:43:07 GMT
  8. Sender: news@nas.nasa.gov
  9. Organization: NAS Program, NASA Ames Research Center, Moffett Field, CA
  10. Lines: 56
  11.  
  12. Hello -
  13.  
  14.     Scenario:
  15.  
  16.     Using Interface Builder I have constructed a front end to one of  
  17. my Fortran programs.  Currently, I use a Form Class containing 5 Cells  
  18. which hold the values of my Fortran program variables.  By typing in  
  19. numbers into the FormCell Fields while building the application in I.B.  
  20. causes default values to appear in the cells upon launching the  
  21. application.  But those values don't get placed into their respected  
  22. variables unless I systematically select a Cell and press Enter.  How can  
  23. I make my application automatically initialize the variables corresponding  
  24. to the FormCells?  
  25.  
  26.  
  27.  
  28.     Sample Code 
  29.  
  30.  
  31. /*  Wave.h   */
  32. /*  WaveInstance is an Instance of Object   */
  33. /*  Input is an outlet of WaveInstance, it is connected to the Form   */
  34. {
  35.     id Input;
  36.     int a;
  37. }
  38.  
  39. - PointsPerWave:sender;
  40. @end
  41.  
  42.  
  43.  
  44.  
  45. /*  Wave.m    */
  46. /*  PointsPerWave is an action of WaveInstance, its connection is from  */
  47. /*   a FormCell in the Form   */
  48. /*   "a" is the variable which is assigned the value in the form cell */
  49. - PointsPerWave:sender;
  50. {
  51.     a=[Input IntValue]
  52.     return self;
  53. }
  54.  
  55.  
  56.     Once Again!
  57.  
  58.     How can I set a=10 upon program initialization without having to  
  59. call the PointsPerWave method.   Should I force a call to the  
  60. PointsPerWave method?  How would one force a method?
  61.  
  62.  
  63. Thanks -
  64.  
  65. Alex Makarewycz
  66.  
  67. makarewy@rft31.nas.nasa.gov
  68.