• 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: How to insert a "screen-only" character in an NSTextView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to insert a "screen-only" character in an NSTextView?


  • Subject: Re: How to insert a "screen-only" character in an NSTextView?
  • From: Kyle Sluder <email@hidden>
  • Date: Mon, 03 Sep 2012 15:57:12 -0700

On Sep 3, 2012, at 3:06 PM, William Squires <email@hidden> wrote:

> This would be better handled with some sort of filter applied at I/O time (i.e. when you read/write the file) I would think. That is, let your model objects handle the translation, and let the view objects do what view objects are supposed to do. Trying to fiddle around with low-level NSTextStorage just seems to be a way to waste several afternoons pulling out your hair in frustration, methinks!

I disagree. NSTextStorage *is* a model object. It's far better to actually understand and and use the text system (including glyph generation) rather than "fake it" by transforming the model on read/write and ensuring your transformations are perfect mirrors, are applied at the right times, and correctly interact with the pasteboard, undo manager, Services, Input Methods, and VoiceOver.

--Kyle Sluder
_______________________________________________

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: How to insert a "screen-only" character in an NSTextView?
      • From: Koen van der Drift <email@hidden>
    • Re: How to insert a "screen-only" character in an NSTextView?
      • From: Ross Carter <email@hidden>
References: 
 >Re: How to insert a "screen-only" character in an NSTextView? (From: William Squires <email@hidden>)

  • Prev by Date: Re: More sandblasting (oops, I mean sandboxing die die die)
  • Next by Date: Re: More sandblasting (oops, I mean sandboxing die die die)
  • Previous by thread: Re: How to insert a "screen-only" character in an NSTextView?
  • Next by thread: Re: How to insert a "screen-only" character in an NSTextView?
  • Index(es):
    • Date
    • Thread