From 6acacf4ca3894fc8be0c63e257bcb40923eb3546 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 18 Jan 2005 16:04:40 +0000 Subject: [PATCH] 2005-01-18 17:06 Alexander Malmberg * Source/NSWindow.m (-initWithContentRect:styleMask:backing:defer:screen:): Assert that the shared application instance has been created instead of just calling NSLog. Make the message clearer. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20581 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 7 +++++++ Source/NSWindow.m | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 760908497..a5e682182 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-01-18 17:06 Alexander Malmberg + + * Source/NSWindow.m + (-initWithContentRect:styleMask:backing:defer:screen:): Assert that + the shared application instance has been created instead of just + calling NSLog. Make the message clearer. + 2005-01-18 16:53 Alexander Malmberg * Source/NSCell.m (-setUpFieldEditorAttributes:): Clear the diff --git a/Source/NSWindow.m b/Source/NSWindow.m index b1f068f4e..a75957ab5 100644 --- a/Source/NSWindow.m +++ b/Source/NSWindow.m @@ -912,8 +912,9 @@ many times. { NSRect cframe; - if (!NSApp) - NSLog(@"No application!\n"); + NSAssert(NSApp, + @"The shared NSApplication instance must be created before windows " + @"can be created."); NSDebugLLog(@"NSWindow", @"NSWindow start of init\n"); if (!windowmaps) @@ -3109,7 +3110,7 @@ resetCursorRectsForView(NSView *theView) break; case NSScrollWheel: - v = [_wv hitTest: [theEvent locationInWindow]]; + v = [_wv hitTest: [theEvent locationInWindow]]; [v scrollWheel: theEvent]; break;