Re: Communication between objects
Re: Communication between objects
- Subject: Re: Communication between objects
- From: Clint Shryock <email@hidden>
- Date: Wed, 11 Feb 2009 09:00:06 -0600
in order for modelObject1 to talk to modelObject2, it must have
a reference to that object, similar to how myControllerObject has a
reference to both modelObject1 and modelObject2 which you use to send
messages.
+Clint
On Wed, Feb 11, 2009 at 8:42 AM, Jason Wiggins <email@hidden>wrote:
> Hi all,
>
> Can someone please help me with this, I'm tearing my hair out!
>
> Say I have myControllerObject. I alloc and init modelObject1 and also
> modelObject2.
> How do I access the ivars of modelObject1 from modelObject2 and vice versa?
>
> modelObject1 and modelObject 2 both exist somewhere in memory, so how do I
> get a pointer to or make a connection between these two object?
>
> Also, how do I access the ivars of myControllerObject from either
> modelObject1 or modelObject2?
>
> Is it possible to find out from myObject1 or myObject2 who init and alloc
> them?
>
> From what I've read to far (Objective C-2.0 Programming Language and Cocoa
> Fundamentals Guide) I've been unable to find the answer to these questions.
> I can send messages from myControllerObject to myObject1 or myObject2 and
> get returned information no worries, that I do get.
>
> Thanks,
>
> Regards,
> Jason
> _______________________________________________
>
> 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
>
_______________________________________________
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