diff --git a/ChangeLog b/ChangeLog index 71681fa42..e8e82f54b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-11-23 18:56-EST Gregory John Casamento + + * Headers/AppKit/NSLayoutManager.h: Declarations for new methods + to handle temporary attributes. + * Source/GSNibCompatibility.m: Corrections to nib loading logic. + * Source/NSLayoutManager.m: Skeleton implementations of new + methods to handle temporary attributes. + 2008-11-23 Fred Kiefer * Source/NSControl.m (-initWithCoder:): For keyed decoding make @@ -25,6 +33,7 @@ * Source/NSTextView.m (-updateDragTypeRegistration): Register drag types for non-rich text NSTextViews, too. +>>>>>>> .r27123 2008-11-22 20:46-EST Gregory John Casamento * Source/GSNibCompatibility.m: Further improvements to nib loading diff --git a/Headers/AppKit/NSLayoutManager.h b/Headers/AppKit/NSLayoutManager.h index f55c79df3..d0a7d7ed1 100644 --- a/Headers/AppKit/NSLayoutManager.h +++ b/Headers/AppKit/NSLayoutManager.h @@ -183,6 +183,15 @@ GNUstep extension. @end - +@interface NSLayoutManager (temporaryattributes) +- (void) addTemporaryAttributes: (NSDictionary *)attrs forCharacterRange: (NSRange)range; +- (void) addTemporaryAttribute: (NSString *)attr value: (id)value forCharacterRange: (NSRange)range; +- (void) setTemporaryAttributes:forCharacterRange: (NSRange)range; +- (void) removeTemporaryAttribute: (NSString *)attr forCharacterRange: (NSRange)range; +- (id) temporaryAttribute: (NSString *)attr atCharacterIndex: (unsigned int)index effectiveRange: (NSRange)range; +- (id) temporaryAttribute: (NSString *)attr atCharacterIndex: (unsigned int)index longestEffectiveRange: (NSRange*)longestRange inRange: (NSRange)range; +- (NSDictionary *) temporaryAttributesAtCharacterIndex: (unsigned int)index effectiveRange: (NSRange)range; +- (NSDictionary *) temporaryAttributesAtCharacterIndex: (unsigned int) longestEffectiveRange: (NSRange*)longestRange inRange: (NSRange)range; +@end #endif diff --git a/Source/GSNibCompatibility.m b/Source/GSNibCompatibility.m index b5dffa92d..26c0848b6 100644 --- a/Source/GSNibCompatibility.m +++ b/Source/GSNibCompatibility.m @@ -630,8 +630,14 @@ static BOOL _isInInterfaceBuilder = NO; [NSException raise: NSInternalInconsistencyException format: @"Unable to find class '%@'", _className]; } - - _object = [[aClass allocWithZone: NSDefaultMallocZone()] init]; + if(GSObjCIsKindOf(aClass, [NSApplication class])) + { + _object = [aClass sharedApplication]; + } + else + { + _object = [[aClass allocWithZone: NSDefaultMallocZone()] init]; + } } } else @@ -1072,7 +1078,7 @@ static BOOL _isInInterfaceBuilder = NO; id menu = nil; // replace the owner with the actual instance provided. - [_root setObject: owner]; + [self setRoot: owner]; // iterate over connections, instantiate, and then establish them. while ((obj = [en nextObject]) != nil) @@ -1284,7 +1290,7 @@ static BOOL _isInInterfaceBuilder = NO; { if ([coder allowsKeyedCoding]) { - ASSIGN(_root, [coder decodeObjectForKey: @"NSRoot"]); + // ASSIGN(_root, [coder decodeObjectForKey: @"NSRoot"]); ASSIGN(_visibleWindows, (NSMutableArray *)[coder decodeObjectForKey: @"NSVisibleWindows"]); ASSIGN(_accessibilityConnectors, (NSMutableArray *)[coder decodeObjectForKey: @"NSAccessibilityConnectors"]); ASSIGN(_fontManager, [coder decodeObjectForKey: @"NSFontManager"]); diff --git a/Source/NSLayoutManager.m b/Source/NSLayoutManager.m index 782dde584..a1a64332b 100644 --- a/Source/NSLayoutManager.m +++ b/Source/NSLayoutManager.m @@ -2291,3 +2291,48 @@ no_soft_invalidation: @end +@implementation NSLayoutManager (temporaryattributes) +- (void) addTemporaryAttributes: (NSDictionary *)attrs forCharacterRange: (NSRange)range +{ + // to be implemented +} + +- (void) addTemporaryAttribute: (NSString *)attr value: (id)value forCharacterRange: (NSRange)range +{ + // to be implemented +} + +- (void) setTemporaryAttributes:forCharacterRange: (NSRange)range +{ + // to be implemented +} + +- (void) removeTemporaryAttribute: (NSString *)attr forCharacterRange: (NSRange)range +{ + // to be implemented +} + +- (id) temporaryAttribute: (NSString *)attr atCharacterIndex: (unsigned int)index effectiveRange: (NSRange)range +{ + // to be implemented + return nil; +} + +- (id) temporaryAttribute: (NSString *)attr atCharacterIndex: (unsigned int)index longestEffectiveRange: (NSRange*)longestRange inRange: (NSRange)range +{ + // to be implemented + return nil; +} + +- (NSDictionary *) temporaryAttributesAtCharacterIndex: (unsigned int)index effectiveRange: (NSRange)range +{ + // to be implemented + return nil; +} + +- (NSDictionary *) temporaryAttributesAtCharacterIndex: (unsigned int) longestEffectiveRange: (NSRange*)longestRange inRange: (NSRange)range +{ + // to be implemented + return nil; +} +@end