There is a bug in the text system, which I have reported and filed previously. If you programmatically change the text, the KVO for the bindings is not triggered and will not update the text storage. If you then use the keyboard for another edit, it will trigger it and will commit both changes. This could have some relation to your problem.
On 5/10/10 2:02 PM, "cocoa-dev-requ...@lists.apple.com" <cocoa-dev-requ...@lists.apple.com> wrote: > On May 10, 2010, at 9:19 AM, Gideon King wrote: > >> From a conceptual point of view, my understanding of MVC means that a user >> initiated action should be reflected in the model (text storage), which >> should push it through to the view, which should mean that doing the changes >> in the text storage "should" be OK∑ > > The NSLayoutManager and associated classes are part of the model too. I think > what‚s happening is that those objects are seeing the text before it goes into > your TextStorage, and interpreting the original attributes; while later on > they pull the text out and see the altered attributes. > >> The behavior I'm observing seems to clearly be a case of the view being out >> of sync with the text storage, until you type something, and then it syncs up >> again. > > It‚s the layout that‚s out of sync, sounds like. The layout is part of the > model and can be shared by multiple views. > > ˜Jens _______________________________________________ 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