• 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: NSTextView read real text content (without 0xA added by wordwrap)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView read real text content (without 0xA added by wordwrap)


  • Subject: Re: NSTextView read real text content (without 0xA added by wordwrap)
  • From: Graham Cox <email@hidden>
  • Date: Tue, 27 Sep 2016 19:32:48 +1000

> On 27 Sep 2016, at 7:26 PM, Felipe Monteiro de Carvalho <email@hidden> wrote:
>
> But to be sure I will test the same thing as you are testing, you are
> reading the text via NSTextView.string ?


Yes. I set up a very simple situation where the NSTextView’s delegate simply logs the textView.string as I type. No line breaks unless I actually type one (option-return).

Also, in your OP, you mention textContainer.string. There’s no such property. You probably meant textStorage.string, but let’s make sure. I tried that also, and it works exactly the same.

It would be pretty hard for the word-wrap done by the view to affect the raw string, because it’s a major violation of model-controller-view principles. If something else is adding those, it must be going well out of its way to do it.

—Graham



_______________________________________________

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


References: 
 >NSTextView read real text content (without 0xA added by wordwrap) (From: Felipe Monteiro de Carvalho <email@hidden>)
 >Re: NSTextView read real text content (without 0xA added by wordwrap) (From: Graham Cox <email@hidden>)
 >Re: NSTextView read real text content (without 0xA added by wordwrap) (From: Felipe Monteiro de Carvalho <email@hidden>)

  • Prev by Date: Re: NSTextView read real text content (without 0xA added by wordwrap)
  • Next by Date: Re: NSTextView read real text content (without 0xA added by wordwrap)
  • Previous by thread: Re: NSTextView read real text content (without 0xA added by wordwrap)
  • Next by thread: Re: NSTextView read real text content (without 0xA added by wordwrap)
  • Index(es):
    • Date
    • Thread