Re: Overriding text size in NSTextStorage
Re: Overriding text size in NSTextStorage
- Subject: Re: Overriding text size in NSTextStorage
- From: Jens Alfke <email@hidden>
- Date: Mon, 10 May 2010 09:52:50 -0700
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 (email@hidden)
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:
This email sent to email@hidden