On Sun, Dec 19, 2010 at 1:20 PM, Andy Lee <ag...@mac.com> wrote: > I can understand why Apple wouldn't use a bindings-based solution for this > example, since bindings is an advanced topic unto itself, but I think using > an NSTextStorage would be appropriate given the context. Unless someone > spots a fatal flaw, I'll submit it as a doc suggestion.
The reason they didn't use bindings here is because it's not appropriate for hooking up an NSTextStorage to an NSTextView. Bindings (really, KVO) can't deal with mutable value types. In the world of KVO, all changes mean that the actual object identity has changed, not merely the value it contains. NSTextViews can be used as editors for simple immutable NSString properties, which is when using them with bindings is appropriate. --Kyle Sluder _______________________________________________ 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 arch...@mail-archive.com