- Issue #58, Rolf Jansen's implementation of NSDocument using-[NSWindowController shouldCloseDocument]

This commit is contained in:
Christopher Lloyd 2008-01-16 14:48:40 +00:00
parent e74537fe1e
commit 871e8e19d6

View File

@ -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;
}
}
}