Hello,

I have a normal NSTextView and I would like to programatically read
the text inside it.

This is trivial, just call txt.string or txt.textContainer.string

But the resulting string contains line endings which are added in the
places where the word-wrap takes places, and I need the raw text,
without such added line endings.

Note that I don't want to disable word-wrap!

I assume that Cocoa must know the original text, because otherwise it
would not be able to change the wraping when the control is resized.
Any ideas how to obtain the original text? I tried google to no luck
:( Seams like noone had this problem before.

And no, manually removing all line endings is not what I want, because
some line endings are part of the real text, not added by word-wrap.

thanks in advance,
-- 
Felipe Monteiro de Carvalho
_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to