Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tjhopkins224

macrumors newbie
Original poster
Mar 27, 2008
2
0
What is the best way to handle this simple problem in Obj-C?

ObjectA creates an instance of ObjectB and is free to get and set properties of ObjectB. How can ObjectB similarly reference and send messages back to ObjectA (other than returning data from methods specifically called by Object A)?

Thanks for your time.
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
Have a constructor for ObjectB that takes a pointer to the type of ObjectA, and have ObjectA pass in self when it instantiates ObjectB?

-Lee
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.