gnustep-dev
[Top][All Lists]
Advanced

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

Re: r27812 - in /libs/gui/trunk: ChangeLog Source/NSBundleAdditions.m


From: Fred Kiefer
Subject: Re: r27812 - in /libs/gui/trunk: ChangeLog Source/NSBundleAdditions.m
Date: Fri, 12 Mar 2010 09:47:13 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.8) Gecko/20100228 SUSE/3.0.3-1.1.1 Thunderbird/3.0.3

Am 11.03.2010 19:46, schrieb Wolfgang Lux:
> Fred Kiefer wrote:
> 
>> Am 03.03.2010 10:06, schrieb Wolfgang Lux:
>>> Fred Kiefer wrote:
>>>
>>>> I am not that sure about this.
>>>> When I changed to the current code it was to get the Beans application
>>>> working with GNUstep. There we had the case the components loaded via
>>>> NIB where released to early by GNUstep.
>>>>
>>>> We rather should make sure we handle all cases as similar as Apple as
>>>> possible.
>>>> Richard already added a simple test for KVC to see, if our behaviour
>>>> there matches Cocoa. We will need a similar check for the
>>>> NSNibOutletConnector.
>>>
>>> If we want to be as compatible with Apple as possible, it seems that the
>>> best way to proceed would be to restore the old code. I ran a quick test
>>> this morning, and it seems that Cocoa is calling a -setXxx: method if
>>> present. However, it does ignore private -_setXxx: methods, which KVC
>>> seems to use, though only for backward compatibility. Furthermore, Cocoa
>>> insists on the attribute name being xxx and, unlike KVC, does not assign
>>> nib components to a attribute named _xxx.
>>>
>>> So, if we want to be as compatible with Apple as possible, it seems that
>>> the best way to proceed would be to restore the old code. Or maybe to
>>> move the whole code to gnustep-base and export it from there as a
>>> GNUstep extension.
>>
>> Looks like you are right. I still didn't find the time to test it myself
>> on an Apple machine. What puzzles me is why we had that issue with Bean
>> while it seems to work well on Cocoa...
> 
> 
> I had a quick look into this. After reverting the code in
> -establishConnection I observe a crash in Bean under GNUstep when
> closing a document window. This crash happens in MyDocument
> -updateInspectorController:, which attempts to access views of the nib
> after the window has been closed and released. Apparently, the views are
> not (and should not be) valid at this time. From the data gathered by
> Apple's ObjectAlloc, it seems that this code does not crash under Cocoa
> because Apple manages to deallocate the objects involved in a different
> order. In particular, when the last window of a document is closed the
> document is released and deallocated *before* the last window controller
> and its window are released and deallocated. I'll try to have a closer
> look at this when I find a bit more time.

Thank you for looking into this.
Looks like the basic difference between Cocoa and us is in the window,
window controller and document interaction. And you are the sole expert
we have on this :-)
I think it is now save to replace the NIB outlet connector code. I just
checked the old code against the new runtime functions of base and as
far as I can tell the old code would still work. We could just revert my
change.

Fred






reply via email to

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