Re: Object change to NSView update
Re: Object change to NSView update
- Subject: Re: Object change to NSView update
- From: Ken Thomases <email@hidden>
- Date: Fri, 22 Aug 2008 13:48:48 -0500
On Aug 22, 2008, at 12:18 PM, Paul Bruneau wrote:
Yes I think we agree on that part! The problem I am trying to
communicate is where do I learn to make my model changes go through
a controller, and how do I teach this controller to know to update
the other views? As I said, I think I could get my way through this
if the properties were in the order objects, but they can be in the
children of the children of the order objects.
To learn about the Model-View-Controller design pattern, read the
Cocoa Fundamentals Guide <http://developer.apple.com/documentation/
Cocoa/Conceptual/CocoaFundamentals/>. That will also tell you about
some types of controllers and their roles ("coordinating controller"
vs. "mediating controller").
In there you will also find a discussion of ways to communicate among
objects (the "Communicating With Objects" chapter). Notifications
have already been mentioned. Key-value Observing (KVO) and Bindings
may also serve your needs. Implementing Bindings on a custom view
sounds like it would be a bit advanced for where you are, but it
might be a long-term goal.
After you've familiarized yourself with the fundamentals in this
guide, follow the links it contains to the other, more topic-specific
guides:
Key-Value Coding Programming Guide <http://developer.apple.com/
documentation/Cocoa/Conceptual/KeyValueCoding/>
Key-Value Observing Programming Guide <http://developer.apple.com/
documentation/Cocoa/Conceptual/KeyValueObserving/>
Cocoa Bindings Programming Topics <http://developer.apple.com/
documentation/Cocoa/Conceptual/CocoaBindings/>
Feel free to ask more questions about what you find there.
Cheers,
Ken
_______________________________________________
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