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 1999-07-25 04:58:39 +00:00
parent 2a00135112
commit 2caad61acb
2 changed files with 18 additions and 1 deletions

View file

@ -133,6 +133,8 @@
changeInLength: (int)lengthChange changeInLength: (int)lengthChange
invalidatedRange: (NSRange)invalidatedRange 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; 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 * Managing NSLayoutManagers
*/ */
@ -175,12 +187,15 @@ static Class concrete;
NSNotificationCenter* nc = [NSNotificationCenter defaultCenter]; NSNotificationCenter* nc = [NSNotificationCenter defaultCenter];
NSLog(@"processEditing called in NSTextStorage.");
[nc postNotificationName: NSTextStorageWillProcessEditingNotification [nc postNotificationName: NSTextStorageWillProcessEditingNotification
object: self]; object: self];
r = editedRange; r = editedRange;
r.length += editedDelta; r.length += editedDelta;
[self fixAttributesInRange: r]; // FIXME, Michael: yeah, this is needed.
// [self fixAttributesInRange: r];
[nc postNotificationName: NSTextStorageDidProcessEditingNotification [nc postNotificationName: NSTextStorageDidProcessEditingNotification
object: self]; object: self];