On May 27, 2005, at 5:50 AM, mmalcolm crawford wrote: 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.
That sounds useful. Looking at the NSEditor protocol (<http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Protocols/NSEditor.html>), it seems as if one of the other benefits is that it can be used to ensure that, for example, if a user closes a window before tabbing out of a text field, the changes are committed to the model. Is there anything else that controllers can do for us? What about selections and placeholders?
placeholder's aren't really something you get from controllers.. they're part of the binding themselves. controllers can provide additional markers via the -selection method that you can then change into other values with placeholders... I'm assuming that is what you mean.
Yes, some controllers provide selection, but that may be a moot point if you're using a single object, and that's the only case where people are that likely to try and circumvent the controller. Even then, bad idea.
IB allows you, and even encourages you, to do things that may not be acceptable in all cases. For example, just now IB is encouraging me to throw a brick at mmalc at WWDC... I'm attempting to resist, but it has a compelling argument.
Y'all will just have to come to the first bindings session to find out if I do it.
Secrest out!
|