On 16/04/2010, at 11:30 PM, Matt DeFoor wrote:

> One other approach I've considered is whether the Model should have
> the ability to update itself at all. Should the controller be
> responsible for updating the resource always?

No, because if another controller is able to affect the model, the update won't 
get noticed.

The resource should keep track of WHEN an update is required, but it should not 
make any assumptions about HOW the update is actually accomplished. It can do 
that using classic notifications or KVO. The controller(s) can receive those 
notifications and translate them into the required actions on the view(s) they 
control to get the update performed.

Also, having a manual refresh button should be unnecessary - if your resource 
is always able to flag an update whenever a change in its state occurs, then 
there is no possibility that the view and the model will get out of step.

--Graham


_______________________________________________

Cocoa-dev mailing list ([email protected])

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