// Give the field a default value and force layout.
[textView setString:DEFAULT_TEXT];
[textView sizeToFit];
// Set up initial state for the unfortunate book keeping we have to do for our resizing text views in order to cause proper display invalidation for their superviews when they shrink.
// Check to see if we shrunk. If we did, our superview will need some redrawing. NSView should do this itself, but it doesn't in 4.0.
if (knownFrame) {
if (NSWidth(*knownFrame) > NSWidth(newFrame)) {
// This isn't exactly general code for invalidating the areas we've exposed, but since we know something about the way it happens, we can make a few assumptions. We know that only the width is changing. We also know, based on the alignment exactly how the origin is moving based on the size differences. In other applications these assumptions might not hold.