On May 27, 2005, at 5:33 AM, mmalcolm crawford wrote:
On May 27, 2005, at 2:17 AM, Scott Anguish wrote:
You bind an attribute of a UI widget to the property of a model object...
picking one further nit on this.. Always, always use a controller.
Oh, indeed --- controller taken as read! :-)
So, Scott, people sometimes ask, "What are the benefits of using a controller? Don't they just get in the way?" What would you say to these people? ;-)
If ever there was a setup...
Suck it up and use them cuz Andreas said so? :-) I guess that only sticks for those of us who are were in that meeting....
Controllers implement the NSEditor/NSEditorRegistration protocols. That means that they correctly handle the cases when documents revert, or save, and forward the correct notifications to the model/view items when that happens. This way models get any uncommitted edits, and can handle them appropriately.
Apple doesn't endorse or recommend connecting UI to model directly, nor model<->model bindings
-- "William Cheeseman ... is said not to be a doofus in real life." - Roger Ebert, Chicago Sun-Times Online, Jan 8, 1998
|