Thanks - applied your suggestion and made some related changes around
trying to make sure we have the different window closing behaviour in case
_document == nil or _document != nil ... let me know if you have problems
with it.
> 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
>
>
_______________________________________________
Bug-gnustep mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gnustep