home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / next / programm / 5158 < prev    next >
Encoding:
Text File  |  1992-07-21  |  1.1 KB  |  37 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!uw-beaver!news.u.washington.edu!news
  3. From: goldly@u.washington.edu (Lloyd P. Goldwasser)
  4. Subject: Accessing the values of variables in other objects?
  5. Message-ID: <1992Jul21.234421.8444@u.washington.edu>
  6. Sender: news@u.washington.edu (USENET News System)
  7. Organization: University of Washington
  8. Date: Tue, 21 Jul 1992 23:44:21 GMT
  9. Lines: 26
  10.  
  11. Here's a simple Objective-C question with, I suspect, a simple yes-or-no  
  12. answer.
  13.  
  14. Is it possible to access directly the values of variables in other objects?
  15.  
  16.   e.g., [anotherObject whatIsTheValueOf: this_variable];
  17.   and   [anotherObject whatIsTheValueOf: that_variable];
  18.  
  19. It would be convenient not to have to dedicate a whole method to transferring  
  20. the value of this_variable only; i.e., without putting
  21.  
  22.    - tellTheValueOfThisVariable:(float *)dummy_variable
  23.    {
  24.      *dummy_variable = this_variable;
  25.    }
  26.  
  27. into the implementation of anotherObject.
  28.  
  29. Simply including the header file of the other object doesn't seem to do the  
  30. trick.
  31.  
  32.  
  33. Thanks in advance,
  34.  
  35. Lloyd Goldwasser
  36. goldly@u.washington.edu
  37.