What appears to happen is that it tries to get the first responder of
the window, and then its delegate and crashes there, thus the window has
no delegate anymore. In the debugger I tried to print out the window to
know which one it is, but I get a sound crash, thus perhaps even the
window isn't there anymore.
The delegate is set EditWindowController.m:213
Is there some difference between the NIB and the GS code? I do wonder.
And I wonder, why you are taking different Code paths for GNUstep and
MacOSX. Is there any difference? If not, just remove the hardcoded
GNUstep windows building and use the NIB files there as well.
Actually, I am really interested which of the special GNUstep code path
are needed and why.
The delegate owns the, window, doesn't it? I am releasing the delegate.
Why do I get in there?
That is a good question. A window controller sets its window to nil,
when it gets deallocated. This releases the window and should cut the
connection from the window to the controller. But only the connections
GNUstep knows about. If your code sets the controller as the delegate of
the window (Why do you do this? You don't seem to need it on MacOSX),
you will need to override the -setWindow: and clean out the delegate
when the window gets reset.
The notifications comes from becoming key apparently, but I am closing
the window, the key should become the main MailViewer!
In fact, if I don't have a mail viewer open and just open a compose
window, I can close it.
I'm confused. Hints or help is appreciated. I hate when stuff works on
the Mac and then fails on GS...
In that case, try to use the same code on both platforms :-)
Fred
_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep