Re: Newbie: Referencing Objects (second try)
Re: Newbie: Referencing Objects (second try)
- Subject: Re: Newbie: Referencing Objects (second try)
- From: Nick Zitzmann <email@hidden>
- Date: Sun, 26 Oct 2008 15:40:58 -0600
On Oct 26, 2008, at 2:59 PM, john fogg wrote:
When I'm inside "secondSubObject" how can I alter a variable in
"secondMainObject"?
Use accessors. In secondSubObject, create an @property(assign)
SecondMainObject *secondMainObject; so that you can call methods in
secondMainObjct from secondSubObject.
Note that it's important that you assign instead of retain in this
instance, or else you'll create a retention loop memory leak unless
you're using GC.
And how can I alter a variable in "firstMainObject"?
Again, use accessors so that objects can communicate with other objects.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden