From 871e8e19d64d31701b4a95c3774000fa935da318 Mon Sep 17 00:00:00 2001 From: Christopher Lloyd Date: Wed, 16 Jan 2008 14:48:40 +0000 Subject: [PATCH] - Issue #58, Rolf Jansen's implementation of NSDocument using-[NSWindowController shouldCloseDocument] --- AppKit/NSDocument.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/AppKit/NSDocument.m b/AppKit/NSDocument.m index 86ea5a74..a2559304 100755 --- a/AppKit/NSDocument.m +++ b/AppKit/NSDocument.m @@ -924,11 +924,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI NSWindowController *controller=[_windowControllers objectAtIndex:count]; if([controller isWindowLoaded] && window==[controller window]){ - if([controller shouldCloseDocument]){ - } - - [_windowControllers removeObjectAtIndex:count]; - return; + BOOL closeMe = [controller shouldCloseDocument]; + [_windowControllers removeObjectAtIndex:count]; + if (closeMe) + [self close]; + return; } } }