Article View: comp.sys.next.programmer
Article #163Accessing the values of variables in other objects?
From: Lloyd P. Goldwasser
Date: Tue, 21 Jul 1992 23:44
Date: Tue, 21 Jul 1992 23:44
26 lines
1209 bytes
1209 bytes
Here's a simple Objective-C question with, I suspect, a simple yes-or-no
answer.
Is it possible to access directly the values of variables in other objects?
e.g., [anotherObject whatIsTheValueOf: this_variable];
and [anotherObject whatIsTheValueOf: that_variable];
It would be convenient not to have to dedicate a whole method to transferring
the value of this_variable only; i.e., without putting
- tellTheValueOfThisVariable:(float *)dummy_variable
{
*dummy_variable = this_variable;
}
into the implementation of anotherObject.
Simply including the header file of the other object doesn't seem to do the
trick.
Thanks in advance,
Lloyd Goldwasser
goldly@u.washington.edu
Technical Details
Message-ID:
<1992Jul21.234421.8444@u.washington.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!uw-beaver!news.u.washington.edu!newsShow Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!uw-beaver!news.u.washington.edu!news From: goldly@u.washington.edu (Lloyd P. Goldwasser) Subject: Accessing the values of variables in other objects? Message-ID: <1992Jul21.234421.8444@u.washington.edu> Sender: news@u.washington.edu (USENET News System) Organization: University of Washington Date: Tue, 21 Jul 1992 23:44:21 GMT Lines: 26