mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 17:10:56 +00:00
Send windowControllerWillLoadNib: and windowControllerDidLoadNib: to
the owner of the nib, since this is what Apple seems to do and since this behavior is more useful when a non-document class uses a window controller. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31491 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fd98ae8cbc
commit
15c24d53a9
2 changed files with 22 additions and 8 deletions
|
@ -1,3 +1,11 @@
|
|||
2010-10-08 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Source/NSWindowController.m (-window): Send
|
||||
windowControllerWillLoadNib: and windowControllerDidLoadNib: to
|
||||
the owner of the nib, since this is what Apple seems to do and
|
||||
since this behavior is more useful when a non-document class uses
|
||||
a window controller.
|
||||
|
||||
2010-09-27 Quentin Mathe <quentin.mathe@gmail.com>
|
||||
|
||||
Fixed NSOutlineView to use incremental loading as Mac OS X does.
|
||||
|
|
|
@ -295,22 +295,28 @@
|
|||
{
|
||||
// Do all the notifications. Yes, the docs say this should
|
||||
// be implemented here instead of in -loadWindow itself.
|
||||
|
||||
// Note: The docs say that windowController{Will,Did}LoadNib: are sent
|
||||
// to the window controller's document, but Apple's implementation
|
||||
// really sends them to the owner of the nib. Since this behavior is
|
||||
// more useful, in particular when non-document classes use a window
|
||||
// controller, we implement it here too.
|
||||
[self windowWillLoad];
|
||||
if ([_document respondsToSelector:
|
||||
@selector(windowControllerWillLoadNib:)])
|
||||
if (_owner != self &&
|
||||
[_owner respondsToSelector: @selector(windowControllerWillLoadNib:)])
|
||||
{
|
||||
[_document windowControllerWillLoadNib:self];
|
||||
[_owner windowControllerWillLoadNib: self];
|
||||
}
|
||||
|
||||
[self loadWindow];
|
||||
if ([self isWindowLoaded])
|
||||
{
|
||||
[self _windowDidLoad];
|
||||
if ([_document respondsToSelector:
|
||||
@selector(windowControllerDidLoadNib:)])
|
||||
{
|
||||
[_document windowControllerDidLoadNib:self];
|
||||
}
|
||||
if (_owner != self &&
|
||||
[_owner respondsToSelector: @selector(windowControllerDidLoadNib:)])
|
||||
{
|
||||
[_owner windowControllerDidLoadNib: self];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue