Replace use of NSLog with NSDebugLog

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@1644 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
gnustep 1996-07-11 00:59:30 +00:00
parent c5bab12ee8
commit f862cf8a2b
13 changed files with 58 additions and 45 deletions

View file

@ -1,5 +1,18 @@
Wed Jul 10 17:11:53 1996 Scott Christley <scottc@net-community.com> Wed Jul 10 17:11:53 1996 Scott Christley <scottc@net-community.com>
* Source/NSView.m: Use NSDebugLog instead of NSLog.
* Source/NSWindow.m: Likewise.
* Source/NSResponder.m: Likewise.
* Source/NSMatrix.m: Likewise.
* Source/NSFontPanel.m: Likewise.
* Source/NSFontManager.m: Likewise.
* Source/NSFont.m: Likewise.
* Source/NSEvent.m: Likewise.
* Source/NSControl.m: Likewise.
* Source/NSButtonCell.m: Likewise.
* Source/NSApplication.m: Likewise.
* Source/NSActionCell.m: Likewise.
* Source/Makefile.sed.nt: Disable debugging by default. * Source/Makefile.sed.nt: Disable debugging by default.
Wed Jun 26 12:43:17 1996 GNUstep Development <gnustep@duncan.ocbi.com> Wed Jun 26 12:43:17 1996 GNUstep Development <gnustep@duncan.ocbi.com>

View file

@ -41,7 +41,7 @@
{ {
if (self == [NSActionCell class]) if (self == [NSActionCell class])
{ {
NSLog(@"Initialize NSActionCell class\n"); NSDebugLog(@"Initialize NSActionCell class\n");
// Initial version // Initial version
[self setVersion:1]; [self setVersion:1];

View file

@ -108,7 +108,7 @@ NSString *NSApplicationWillUpdateNotification;
{ {
if (self == [NSApplication class]) if (self == [NSApplication class])
{ {
NSLog(@"Initialize NSApplication class\n"); NSDebugLog(@"Initialize NSApplication class\n");
// Initial version // Initial version
[self setVersion:1]; [self setVersion:1];
@ -138,7 +138,7 @@ NSString *NSApplicationWillUpdateNotification;
{ {
[super init]; [super init];
NSLog(@"Begin of NSApplication -init\n"); NSDebugLog(@"Begin of NSApplication -init\n");
// allocate the window list // allocate the window list
window_list = [NSMutableArray array]; window_list = [NSMutableArray array];
@ -177,7 +177,7 @@ NSString *NSApplicationWillUpdateNotification;
{ {
int i, j; int i, j;
//NSLog(@"Freeing NSApplication\n"); NSDebugLog(@"Freeing NSApplication\n");
// Let ourselves know we are within dealloc // Let ourselves know we are within dealloc
gnustep_gui_app_is_in_dealloc = YES; gnustep_gui_app_is_in_dealloc = YES;
@ -243,7 +243,7 @@ NSString *NSApplicationWillUpdateNotification;
{ {
NSEvent *e; NSEvent *e;
NSLog(@"NSApplication -run\n"); NSDebugLog(@"NSApplication -run\n");
[self finishLaunching]; [self finishLaunching];
@ -265,7 +265,7 @@ NSString *NSApplicationWillUpdateNotification;
} while (!app_should_quit); } while (!app_should_quit);
app_is_running = YES; app_is_running = YES;
NSLog(@"NSApplication end of run loop\n"); NSDebugLog(@"NSApplication end of run loop\n");
} }
- (int)runModalForWindow:(NSWindow *)theWindow - (int)runModalForWindow:(NSWindow *)theWindow
@ -283,7 +283,7 @@ NSString *NSApplicationWillUpdateNotification;
// Don't send the null event // Don't send the null event
if (theEvent == NullEvent) if (theEvent == NullEvent)
{ {
NSLog(@"Not sending the Null Event\n"); NSDebugLog(@"Not sending the Null Event\n");
return; return;
} }
@ -299,7 +299,7 @@ NSString *NSApplicationWillUpdateNotification;
case NSKeyDown: case NSKeyDown:
{ {
NSLog(@"send key down event\n"); NSDebugLog(@"send key down event\n");
[[theEvent window] sendEvent:theEvent]; [[theEvent window] sendEvent:theEvent];
break; break;
} }
@ -314,13 +314,13 @@ NSString *NSApplicationWillUpdateNotification;
// //
default: default:
{ {
if (!theEvent) NSLog(@"NSEvent is nil!\n"); if (!theEvent) NSDebugLog(@"NSEvent is nil!\n");
NSLog(@"NSEvent type: %d\n", [theEvent type]); NSDebugLog(@"NSEvent type: %d\n", [theEvent type]);
NSLog(@"send event to window\n"); NSDebugLog(@"send event to window\n");
NSLog([[theEvent window] description]); NSDebugLog([[theEvent window] description]);
NSLog(@"\n"); NSDebugLog(@"\n");
if (![theEvent window]) if (![theEvent window])
NSLog(@"no window\n"); NSDebugLog(@"no window\n");
[[theEvent window] sendEvent:theEvent]; [[theEvent window] sendEvent:theEvent];
} }
} }

View file

@ -260,22 +260,22 @@
{ {
[super encodeWithCoder:aCoder]; [super encodeWithCoder:aCoder];
NSLog(@"NSButtonCell: start encoding\n"); NSDebugLog(@"NSButtonCell: start encoding\n");
[aCoder encodeObject: alt_contents]; [aCoder encodeObject: alt_contents];
[aCoder encodeObject: alt_image]; [aCoder encodeObject: alt_image];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &transparent]; [aCoder encodeValueOfObjCType: @encode(BOOL) at: &transparent];
NSLog(@"NSButtonCell: finish encoding\n"); NSDebugLog(@"NSButtonCell: finish encoding\n");
} }
- initWithCoder:aDecoder - initWithCoder:aDecoder
{ {
[super initWithCoder:aDecoder]; [super initWithCoder:aDecoder];
NSLog(@"NSButtonCell: start decoding\n"); NSDebugLog(@"NSButtonCell: start decoding\n");
alt_contents = [aDecoder decodeObject]; alt_contents = [aDecoder decodeObject];
alt_image = [aDecoder decodeObject]; alt_image = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &transparent]; [aDecoder decodeValueOfObjCType: @encode(BOOL) at: &transparent];
NSLog(@"NSButtonCell: finish decoding\n"); NSDebugLog(@"NSButtonCell: finish decoding\n");
return self; return self;
} }

View file

@ -50,7 +50,7 @@ NSString *NSControlTextDidChangeNotification;
{ {
if (self == [NSControl class]) if (self == [NSControl class])
{ {
NSLog(@"Initialize NSControl class\n"); NSDebugLog(@"Initialize NSControl class\n");
// Initial version // Initial version
[self setVersion:1]; [self setVersion:1];

View file

@ -140,7 +140,7 @@
{ {
if (self == [NSEvent class]) if (self == [NSEvent class])
{ {
NSLog(@"Initialize NSEvent class\n"); NSDebugLog(@"Initialize NSEvent class\n");
// Initial version // Initial version
[self setVersion:1]; [self setVersion:1];

View file

@ -62,7 +62,7 @@ NSString *NSAFMXHeight;
{ {
if (self == [NSFont class]) if (self == [NSFont class])
{ {
NSLog(@"Initialize NSFont class\n"); NSDebugLog(@"Initialize NSFont class\n");
// Initial version // Initial version
[self setVersion:1]; [self setVersion:1];

View file

@ -48,7 +48,7 @@ id MB_THE_FONT_PANEL_FACTORY;
{ {
if (self == [NSFontManager class]) if (self == [NSFontManager class])
{ {
NSLog(@"Initialize NSFontManager class\n"); NSDebugLog(@"Initialize NSFontManager class\n");
// Initial version // Initial version
[self setVersion:1]; [self setVersion:1];

View file

@ -41,7 +41,7 @@
{ {
if (self == [NSFontPanel class]) if (self == [NSFontPanel class])
{ {
NSLog(@"Initialize NSFontPanel class\n"); NSDebugLog(@"Initialize NSFontPanel class\n");
// Initial version // Initial version
[self setVersion:1]; [self setVersion:1];

View file

@ -1103,7 +1103,7 @@ Class NSMATRIX_DEFAULT_CELL_CLASS;
newSize.width = 0; newSize.width = 0;
newSize.height = 0; newSize.height = 0;
NSLog(@"NSMatrix intercell height: %4.0f\n", inter_cell.height); NSDebugLog(@"NSMatrix intercell height: %4.0f\n", inter_cell.height);
for (row=0; row<num_rows; row++) for (row=0; row<num_rows; row++)
{ {
@ -1130,7 +1130,7 @@ Class NSMATRIX_DEFAULT_CELL_CLASS;
} }
#if 1 #if 1
NSLog(@"NSMatrix size: %4.0f %4.0f\n",newSize.width,newSize.height); NSDebugLog(@"NSMatrix size: %4.0f %4.0f\n",newSize.width,newSize.height);
#endif #endif
[(NSView *)self setFrameSize:newSize]; [(NSView *)self setFrameSize:newSize];

View file

@ -40,7 +40,7 @@
{ {
if (self == [NSResponder class]) if (self == [NSResponder class])
{ {
NSLog(@"Initialize NSResponder class\n"); NSDebugLog(@"Initialize NSResponder class\n");
// Initial version // Initial version
[self setVersion:1]; [self setVersion:1];

View file

@ -57,7 +57,7 @@ NSString *NSViewFocusChangedNotification;
{ {
if (self == [NSView class]) if (self == [NSView class])
{ {
NSLog(@"Initialize NSView class\n"); NSDebugLog(@"Initialize NSView class\n");
// Initial version // Initial version
[self setVersion:1]; [self setVersion:1];
@ -523,7 +523,7 @@ NSString *NSViewFocusChangedNotification;
// Convert out origin to window coordinates // Convert out origin to window coordinates
q = [self convertPointToWindow: bounds.origin]; q = [self convertPointToWindow: bounds.origin];
NSLog(@"point convert: %f %f %f %f\n", p.x, p.y, q.x, q.y); NSDebugLog(@"point convert: %f %f %f %f\n", p.x, p.y, q.x, q.y);
// now translate // now translate
p.x -= q.x; p.x -= q.x;
@ -551,7 +551,7 @@ NSString *NSViewFocusChangedNotification;
p = [self convertPointToWindow: aPoint]; p = [self convertPointToWindow: aPoint];
r = [aView bounds]; r = [aView bounds];
q = [aView convertPointToWindow: r.origin]; q = [aView convertPointToWindow: r.origin];
NSLog(@"point convert: %f %f %f %f\n", p.x, p.y, q.x, q.y); NSDebugLog(@"point convert: %f %f %f %f\n", p.x, p.y, q.x, q.y);
// now translate // now translate
p.x -= q.x; p.x -= q.x;
@ -1106,7 +1106,7 @@ title:(NSString *)aTitle
{ {
[super encodeWithCoder:aCoder]; [super encodeWithCoder:aCoder];
NSLog(@"NSView: start encoding\n"); NSDebugLog(@"NSView: start encoding\n");
[aCoder encodeRect: frame]; [aCoder encodeRect: frame];
[aCoder encodeRect: bounds]; [aCoder encodeRect: bounds];
[aCoder encodeObjectReference: super_view withName: @"Superview"]; [aCoder encodeObjectReference: super_view withName: @"Superview"];
@ -1122,14 +1122,14 @@ title:(NSString *)aTitle
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &disable_autodisplay]; [aCoder encodeValueOfObjCType:@encode(BOOL) at: &disable_autodisplay];
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &post_frame_changes]; [aCoder encodeValueOfObjCType:@encode(BOOL) at: &post_frame_changes];
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &autoresize_subviews]; [aCoder encodeValueOfObjCType:@encode(BOOL) at: &autoresize_subviews];
NSLog(@"NSView: finish encoding\n"); NSDebugLog(@"NSView: finish encoding\n");
} }
- initWithCoder:aDecoder - initWithCoder:aDecoder
{ {
[super initWithCoder:aDecoder]; [super initWithCoder:aDecoder];
NSLog(@"NSView: start decoding\n"); NSDebugLog(@"NSView: start decoding\n");
frame = [aDecoder decodeRect]; frame = [aDecoder decodeRect];
bounds = [aDecoder decodeRect]; bounds = [aDecoder decodeRect];
[aDecoder decodeObjectAt: &super_view withName: NULL]; [aDecoder decodeObjectAt: &super_view withName: NULL];
@ -1145,7 +1145,7 @@ title:(NSString *)aTitle
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &disable_autodisplay]; [aDecoder decodeValueOfObjCType:@encode(BOOL) at: &disable_autodisplay];
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &post_frame_changes]; [aDecoder decodeValueOfObjCType:@encode(BOOL) at: &post_frame_changes];
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &autoresize_subviews]; [aDecoder decodeValueOfObjCType:@encode(BOOL) at: &autoresize_subviews];
NSLog(@"NSView: finish decoding\n"); NSDebugLog(@"NSView: finish decoding\n");
return self; return self;
} }

View file

@ -66,7 +66,7 @@ NSString *NSWindowWillMoveNotification;
{ {
if (self == [NSWindow class]) if (self == [NSWindow class])
{ {
NSLog(@"Initialize NSWindow class\n"); NSDebugLog(@"Initialize NSWindow class\n");
// Initial version // Initial version
[self setVersion:1]; [self setVersion:1];
@ -113,7 +113,7 @@ NSString *NSWindowWillMoveNotification;
{ {
int style; int style;
NSLog(@"NSWindow -init\n"); NSDebugLog(@"NSWindow -init\n");
style = NSTitledWindowMask | NSClosableWindowMask style = NSTitledWindowMask | NSClosableWindowMask
| NSMiniaturizableWindowMask | NSResizableWindowMask; | NSMiniaturizableWindowMask | NSResizableWindowMask;
return [self initWithContentRect:NSZeroRect styleMask:style return [self initWithContentRect:NSZeroRect styleMask:style
@ -144,7 +144,7 @@ NSString *NSWindowWillMoveNotification;
backing:(NSBackingStoreType)bufferingType backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag defer:(BOOL)flag
{ {
NSLog(@"NSWindow -initWithContentRect:\n"); NSDebugLog(@"NSWindow -initWithContentRect:\n");
return [self initWithContentRect:contentRect styleMask:aStyle return [self initWithContentRect:contentRect styleMask:aStyle
backing:bufferingType defer:flag screen:nil]; backing:bufferingType defer:flag screen:nil];
} }
@ -157,13 +157,13 @@ NSString *NSWindowWillMoveNotification;
{ {
NSApplication *theApp = [NSApplication sharedApplication]; NSApplication *theApp = [NSApplication sharedApplication];
NSLog(@"NSWindow default initializer\n"); NSDebugLog(@"NSWindow default initializer\n");
if (!theApp) if (!theApp)
NSLog(@"No application!\n"); NSLog(@"No application!\n");
[super init]; [super init];
NSLog(@"NSWindow start of init\n"); NSDebugLog(@"NSWindow start of init\n");
frame = contentRect; frame = contentRect;
style_mask = aStyle; style_mask = aStyle;
@ -193,7 +193,7 @@ NSString *NSWindowWillMoveNotification;
// Register ourselves with the Application object // Register ourselves with the Application object
[theApp addWindowsItem:self title:window_title filename:NO]; [theApp addWindowsItem:self title:window_title filename:NO];
NSLog(@"NSWindow end of init\n"); NSDebugLog(@"NSWindow end of init\n");
return self; return self;
} }
@ -884,8 +884,8 @@ NSString *NSWindowWillMoveNotification;
case NSLeftMouseDown: case NSLeftMouseDown:
{ {
NSView *v = [content_view hitTest:[theEvent locationInWindow]]; NSView *v = [content_view hitTest:[theEvent locationInWindow]];
NSLog([content_view description]); NSDebugLog([content_view description]);
NSLog(@"\n"); NSDebugLog(@"\n");
[v mouseDown:theEvent]; [v mouseDown:theEvent];
last_point = [theEvent locationInWindow]; last_point = [theEvent locationInWindow];
break; break;
@ -1235,7 +1235,7 @@ NSString *NSWindowWillMoveNotification;
[super encodeWithCoder:aCoder]; [super encodeWithCoder:aCoder];
NSLog(@"NSWindow: start encoding\n"); NSDebugLog(@"NSWindow: start encoding\n");
[aCoder encodeRect:frame]; [aCoder encodeRect:frame];
[aCoder encodeObject:content_view]; [aCoder encodeObject:content_view];
// [aCoder encodeObjectReference: first_responder withName:NULL]; // [aCoder encodeObjectReference: first_responder withName:NULL];
@ -1254,7 +1254,7 @@ NSString *NSWindowWillMoveNotification;
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_miniaturized]; [aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_miniaturized];
[aCoder encodeValueOfObjCType:"I" at: &style_mask]; [aCoder encodeValueOfObjCType:"I" at: &style_mask];
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &menu_exclude]; [aCoder encodeValueOfObjCType:@encode(BOOL) at: &menu_exclude];
NSLog(@"NSWindow: finish encoding\n"); NSDebugLog(@"NSWindow: finish encoding\n");
} }
- initWithCoder:aDecoder - initWithCoder:aDecoder
@ -1263,7 +1263,7 @@ NSString *NSWindowWillMoveNotification;
[super initWithCoder:aDecoder]; [super initWithCoder:aDecoder];
NSLog(@"NSWindow: start decoding\n"); NSDebugLog(@"NSWindow: start decoding\n");
frame = [aDecoder decodeRect]; frame = [aDecoder decodeRect];
content_view = [aDecoder decodeObject]; content_view = [aDecoder decodeObject];
// [aDecoder decodeObjectAt: &first_responder withName:NULL]; // [aDecoder decodeObjectAt: &first_responder withName:NULL];
@ -1288,7 +1288,7 @@ NSString *NSWindowWillMoveNotification;
// better to do it in the awakeFromCoder method // better to do it in the awakeFromCoder method
theApp = [NSApplication sharedApplication]; theApp = [NSApplication sharedApplication];
[theApp addWindowsItem:self title:nil filename:NO]; [theApp addWindowsItem:self title:nil filename:NO];
NSLog(@"NSWindow: finish decoding\n"); NSDebugLog(@"NSWindow: finish decoding\n");
return self; return self;
} }