* Source/NSTextView.m: initWithCoder: change to use text storage

more directly to allow the handling of attributed strings.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28445 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2009-08-08 17:07:07 +00:00
parent acc0597c97
commit 3a969af071
2 changed files with 9 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2009-08-08 13:06-EDT Gregory John Casamento <greg.casamento@gmail.com>
* 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 <greg.casamento@gmail.com>
* Source/GSTextStorage.m: In initWithCoder: don't overwrite the

View file

@ -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
{