Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text wrap in NSTextView-> how to get wrapped NSString



> Just looked but it uses two different nstextview and a subclass of
> nsmutablestring used to wrap text from nstextview a to final
> destination nstextview b (wrapped). It does not work with a single
> nstextview.

  So, applying the following to your existing text view doesn't help?

    NSTextView    *tv;
    NSArray      *lines;

    //  Get the individual lines as laid out by the text-view with
(soft or hard) newlines.
    lines = [tv lines];

    //  Return a single string with hard newlines in all the places
where the text-view broke it
    return [lines componentsJoinedByString: @"\n"];

--
I.S.
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >Text wrap in NSTextView-> how to get wrapped NSString (From: malcom <email@hidden>)
 >Re: Text wrap in NSTextView-> how to get wrapped NSString (From: glenn andreas <email@hidden>)
 >Re: Text wrap in NSTextView-> how to get wrapped NSString (From: malcom <email@hidden>)
 >Re: Text wrap in NSTextView-> how to get wrapped NSString (From: glenn andreas <email@hidden>)
 >Text wrap in NSTextView-> how to get wrapped NSString (From: malcom <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.