Add two Cocoa debug helper methods.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29924 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2010-03-13 15:17:21 +00:00
parent f159a71c85
commit 60c81d02b6
3 changed files with 42 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2010-03-13 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSWindow.m (-_borderView),
* Source/NSView.m (-_subtreeDescription): Add two Cocoa debug
helper methods.
2010-03-13 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSBundleAdditions.m (NSNibOutletConnector

View file

@ -458,6 +458,33 @@ GSSetDragTypes(NSView* obj, NSArray *types)
return frame;
}
- (NSString*) _subtreeDescriptionWithPrefix: (NSString*)prefix
{
NSMutableString *desc = [[NSMutableString alloc] init];
NSEnumerator *e;
NSView *v;
[desc appendFormat: @"%@%@\n", prefix, [self description], nil];
prefix = [prefix stringByAppendingString: @" "];
e = [_sub_views objectEnumerator];
while ((v = (NSView*)[e nextObject]) != nil)
{
[desc appendString: [v _subtreeDescriptionWithPrefix: prefix]];
}
return desc;
}
/*
* Unofficial Cocoa method for debugging a view hierarchy.
*/
- (NSString*) _subtreeDescription
{
return [self _subtreeDescriptionWithPrefix: @""];
}
/*
* Class methods
*/

View file

@ -344,6 +344,15 @@ has blocked and waited for events.
{
return _wv;
}
/*
* This is just the Apple name for our _windowView method.
*/
- (NSView *) _borderView
{
return _wv;
}
@end