Looking at the documentation for NSTextView, it is highly recommended that you manipulate the NSTextStorage associated with the view. NSTextStorage is a sub-class of NSMutableAttributedtString, so you have all of those capabilities as well.
I’m just getting into this as well for my console application related to my expert system interface. Jonathan > On Feb 2, 2020, at 3:37 PM, Jeff Younker <j...@drinktomi.com> wrote: > > Yes, I've set needsDisplay = true in my attempts to so far. Also needsLayout > = true. > > The question I've got though is what is the recommended way of setting the > value to T2. There is no attributedString variable, just an accessor method, > so I've been trying a variety of insert methods. > > -jeff > > On Sun, Feb 2, 2020 at 12:19 PM Jonathan Prescott <jprescot...@icloud.com > <mailto:jprescot...@icloud.com>> wrote: > Did you tell V that it needs to re-load it’s display? There is a method on > NSView (from which NSTextView is derived) called “needsDisplay(sic)” which > sets a flag on the view so that the view will re-draw its content the next > display cycle. So, after you set the content to T2, you need to call > “V.needsDisplay()” so that the next display cycle the view gets refreshed. > Need to check the spelling of the method. > > Jonathan _______________________________________________ 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