Hi everyone,

I've been reading Object-Oriented Programming with Objective-C, Cocoa Fundamentals Guide and The Objective-C 2.0 Programming Language guide and I still have an unanswered question regarding object networks.

Say I have my controller object "Controller", a model class "Model" and a custom class "textParser". Controller creates an instance of both Model and textParser. As such, Controller can communicate with both the instantiated classes as it has a direct reference to them. But how can I communicate between Model and textParser? How do they know about each other? I have an #import statement in the respective class in both cases but I don't understand where any connection lies beyond that. Sure they know about each others class, but not the instances of that class. More abstractly, how do I get one arbitrary object to communicate with another? What reference do I use?

file:///Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.CoreReference.docset/Contents/Resources/Documents/documentation/Cocoa/Conceptual/CocoaFundamentals/CommunicatingWithObjects/chapter_6_section_3.html states: "An application typically sets outlet connections between its custom controller objects and objects on the user interface, but they can be made between any objects that can be represented as instances in Interface Builder, even between two custom objects. As with any instance variable, you should be able to justify its inclusion in a class; the more instance variables an object has, the more memory it takes up. If there are other ways to obtain a reference to an object, such as finding it through its index position in a matrix, or through its inclusion as a function parameter, or through use of a tag (an assigned numeric identifier), you should do that instead." Okay, if there are other ways of referencing an object, how? I haven't found any clear examples of function parameters or tags.

file:///Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.CoreReference.docset/Contents/Resources/Documents/documentation/Cocoa/Conceptual/OOP_ObjC/Articles/chapter_5_section_1.html talks about an object network, yet doesn't say how to create it. (ref Figure 3-2 Object Network)

Any pointers to any docs on how this works would be greatly appreciated.

Regards,
Jason
_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to