On 11-Feb-09, at 11:14 AM, Jason Wiggins wrote:

OK, now I *think* I've got a bit idea. What I've been trying to do is get an ivar from object1 into object2 *directly* without using the controller as a "middleman" Is it true that I have to set up properties (using Objc 2) to get and set the ivars *via* the controller? I just did that and got it to work. Can i only communicate between objects via the controller who (as obviously named) it controls the flow of data? The only reason I ask this is because after reading Object-Oriented Programming with Objective-C - The Object Model - Figure 3-2 "The object network" shows each object sending messages to each other. Is that picture very abstracted? Because if it is, that figure has messed with my brain.

I think this has been explained.

It is perfectly acceptable for model objects to message one another.

You just need to have a reference to the object you are trying to message. i.e.:

        Company <-->> Employees

Your Company object would have an array of Employees. The Employee objects would each have a reference to their Company.

        From Company: [[[self employees] objectAtIndex:n] doThatThing];
        From Employee: [[self company] doThatOtherThing];


On 12/02/2009, at 02:56 , I. Savant wrote:

On Wed, Feb 11, 2009 at 10:42 AM, Jason Wiggins
<jwigg...@optusnet.com.au> wrote:

I understand MVC ...

Sorry, but I disagree. You've still got some concepts missing. :-)


;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site:   http://codeferous.com
blog:   http://davidleber.net
profile:        http://www.linkedin.com/in/davidleber
twitter:        http://twitter.com/rebeld
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to