home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / next / programm / 5696 < prev    next >
Encoding:
Text File  |  1992-08-19  |  1.6 KB  |  51 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!ukma!darwin.sura.net!rsg1.er.usgs.gov!ornl!usenet
  3. From: woo@ornl.gov(John W. Wooten)
  4. Subject: Filling out info in panel from subclassed Object
  5. Message-ID: <1992Aug19.174734.22858@ornl.gov>
  6. Sender: usenet@ornl.gov (News poster)
  7. Organization: Oak Ridge National Laboratory
  8. Date: Wed, 19 Aug 1992 17:47:34 GMT
  9. Lines: 40
  10.  
  11. I started with DRAW to learn something about manipulating objects which  
  12. are subclasses and using groups of them.
  13. I have placed an addition to the menu under Tools which sends a message  
  14. to the GraphView (via DrawDocument) with
  15. - showProp:sender
  16. /*
  17.  * Displays the properties of the object selected
  18.  */
  19. {
  20.     id g = [self selectedGraphic];
  21.     
  22.     if (g != nil)
  23.         [g showProp];
  24.     return self;
  25. }
  26. Now in the class Graphic, there is a method for showProp
  27. which is null to be overridden by subclasses.  I am now trying
  28. in the subclass of Graphic called Element to bring up the panel I  
  29. defined as PropertyPanel.nib.  The part I have now is shown below.
  30. This works, popping up the panel if Properties is selected in the menu  
  31. when an Element has been selected with the DRAW Tool.
  32.  - showProp
  33. {
  34.     id propertyPanel;
  35.     
  36.  
  37.     propertyPanel = [NXApp loadNibSection:"PropertyPanel.nib"  
  38. owner:self withNames:NO];
  39.     return self;
  40. }
  41.  
  42. The question is:  How do I place information into the fields of that  
  43. panel?  I have instance variables such as elementNumber, area,
  44. and temperature that I want to write into a form on the panel.
  45.  
  46. How do I assign the outlets and actions for the panel?  Do I need an  
  47. Object named myProperties that has such methods and then connect them  
  48. to the panel?
  49. -----------------
  50. J. W. Wooten
  51.