diff --git a/ChangeLog b/ChangeLog index 5d7047d79..1ecdc8e6d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-08-08 13:06-EDT Gregory John Casamento + + * Source/NSTextView.m: initWithCoder: change to use text storage + more directly to allow the handling of attributed strings. + 2009-08-08 03:06-EDT Gregory John Casamento * Source/GSTextStorage.m: In initWithCoder: don't overwrite the diff --git a/Source/NSTextView.m b/Source/NSTextView.m index 700735891..d085ca183 100644 --- a/Source/NSTextView.m +++ b/Source/NSTextView.m @@ -785,7 +785,7 @@ that makes decoding and encoding compatible with the old code. self = [super initWithCoder: aDecoder]; if ([aDecoder allowsKeyedCoding]) { - NSString *textString = @""; + id textString = nil; if ([aDecoder containsValueForKey: @"NSDelegate"]) { [self setDelegate: [aDecoder decodeObjectForKey: @"NSDelegate"]]; @@ -851,8 +851,8 @@ that makes decoding and encoding compatible with the old code. { NSTextContainer *container = [aDecoder decodeObjectForKey: @"NSTextContainer"]; GSLayoutManager *lm = [container layoutManager]; - NSTextStorage *ts = [lm textStorage]; - textString = [ts string]; + textString = [lm textStorage]; + [self setRichText: YES]; } // set up the text network... @@ -874,7 +874,7 @@ that makes decoding and encoding compatible with the old code. [aDecoder decodeIntForKey: @"NSTVFlags"]; } - [self setString: textString]; + [self insertText: textString]; } else {