• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Overriding text size in NSTextStorage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Overriding text size in NSTextStorage
      • From: Gideon King <email@hidden>
References: 
 >Overriding text size in NSTextStorage (From: Gideon King <email@hidden>)
 >Re: Overriding text size in NSTextStorage (From: Jens Alfke <email@hidden>)
 >Re: Overriding text size in NSTextStorage (From: Gideon King <email@hidden>)

  • Prev by Date: Re: Problem mac os X version 10.6 when using sprinft
  • Next by Date: Re: Problem mac os X version 10.6 when using sprinft
  • Previous by thread: Re: Overriding text size in NSTextStorage
  • Next by thread: Re: Overriding text size in NSTextStorage
  • Index(es):
    • Date
    • Thread