discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUMail - editing window crash


From: Riccardo Mottola
Subject: Re: GNUMail - editing window crash
Date: Mon, 03 Feb 2014 02:04:11 +0100
User-agent: Mozilla/5.0 (X11; FreeBSD i386; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23

Hi,

Fred Kiefer wrote:

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.
Well, I do not know "why". I think historically, there was the GS code, when the app was ported to mac, it was redone with NIBs and thus the code-path diverged.

I do not want to use NIBs on GNUstep, they look ugly for many reasons. My plan is to stabilize GNUMail, release it and then slowly and progressively redo its interface with equivalent GORM files which look much better or by creating where more conveniently GUI from code also on the Mac, essentially merging the code. However, this in a next release. The priority is getting a usable GNUMail, after years!!!

So do you suggest removing line 213, setDelegate:self?
The NIB file just sets the delegate to NSOwner.

As a first test, it seems to work! I see no "loss of functionality"...

Riccardo



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

Attachment: riccardo_mottola.vcf
Description: Vcard


reply via email to

[Prev in Thread] Current Thread [Next in Thread]