More text fixes and debugs.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4644 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Michael Silva 1999-07-25 04:58:39 +00:00
parent deae6ecb27
commit 5473688c96
2 changed files with 18 additions and 1 deletions

View file

@ -133,6 +133,8 @@
changeInLength: (int)lengthChange
invalidatedRange: (NSRange)invalidatedRange
{
NSLog(@"NSLayoutManager was just notified that a change in the text
storage occured.");
}
//

View file

@ -80,6 +80,18 @@ static Class concrete;
return nil;
}
- (void) replaceCharactersInRange: (NSRange)aRange
withAttributedString: (NSAttributedString *)attributedString
{
[super replaceCharactersInRange:aRange
withAttributedString:attributedString];
[self edited:NSTextStorageEditedCharacters | NSTextStorageEditedAttributes
range:aRange
changeInLength:aRange.length];
}
/*
* Managing NSLayoutManagers
*/
@ -175,12 +187,15 @@ static Class concrete;
NSNotificationCenter* nc = [NSNotificationCenter defaultCenter];
NSLog(@"processEditing called in NSTextStorage.");
[nc postNotificationName: NSTextStorageWillProcessEditingNotification
object: self];
r = editedRange;
r.length += editedDelta;
[self fixAttributesInRange: r];
// FIXME, Michael: yeah, this is needed.
// [self fixAttributesInRange: r];
[nc postNotificationName: NSTextStorageDidProcessEditingNotification
object: self];