Hi,
In NSWindowController: - (void) _windowWillClose:
(NSNotification *)notification
We have:
if ([notification object] == _window)
{
if ([_window delegate] == self)
{
[_window setDelegate: nil];
}
if ([_window windowController] == self)
{
[_window setWindowController: nil];
}
...
and I think we should have:
if ([notification object] == _window)
{
if ([_window isReleasedWhenClosed])
{
if ([_window delegate] == self)
{
[_window setDelegate: nil];
}
if ([_window windowController] == self)
{
[_window setWindowController: nil];
}
_window = nil;
}
[_document _removeWindowController: self];
}
Otherwise, we remove the delegate and the window controller even if this
window could be shown again with [myWindowControllerObject
showWindow: ...] (think of a singleton) to respond to various events on
various GUI components that have the [_window windowController] as
their target/delegate.
Should it work like that or classes that don't want this behavior should
implement
- (void) windowWillClose: (NSNotification *) theNotification
{
..
}
in the NSWindowController subclasses and set back the delegate and the
window controller?
Thanks a lot,
Ludovic
--
Live as if you were to die tomorrow.
Learn as if you were to live forever.
- Gandhi
_______________________________________________
Bug-gnustep mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gnustep