Re: NSTextView and setString
Re: NSTextView and setString
- Subject: Re: NSTextView and setString
- From: Douglas Davidson <email@hidden>
- Date: Thu, 21 Mar 2002 15:46:45 -0800
On Thursday, March 21, 2002, at 12:59 PM, Brock Brandenberg wrote:
But, bracketing the calls may be necessary at a different level. I am
using a textContainer with bounds of 10,000,000 in both dimensions so
that the layoutManager doesn't wrap the type (with the appropriate
setHeightTracksTextView: etc.). I'm then getting the bounding rects for
the glyphs with layoutManager boundingRectForGlyphRange: and adjusting
the bounds rect and frame rect accordingly. If I simply no-op the
layout manager call to boundingRectForGlyphRange:, the setString works
fine, so the problem may lie with something the layoutManager is doing.
There is almost no documentation on the application of these
layoutManager APIs, so it may be possible that the "glyph generation"
that the minimal docs does mention needs to be bracketed with some
set-up and tear-down calls.
I'm not sure exactly what you're aiming for here, but if you just want
the text view to track the width of the text in the container,
setHorizontallyResizable:YES should do it. You shouldn't have to do it
yourself. See
http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/ProgrammingTopics/
TextStorageLayer/Tasks/TrackingSize.html.
I wish that I could figure out what notification the exception happens
on, but I don't know how to trap it. My knowledge of Cocoa is just too
limited at this point.
The gdb command is
fb -[NSException raise]
Douglas Davidson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.