gnustep-dev
[Top][All Lists]
Advanced

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

Re: [Gnustep-cvs] r30361 - in /libs/gui/trunk: ChangeLog Source/GSNibLoa


From: Wolfgang Lux
Subject: Re: [Gnustep-cvs] r30361 - in /libs/gui/trunk: ChangeLog Source/GSNibLoading.m
Date: Wed, 12 May 2010 17:30:55 +0200

I wrote:

Fred Kiefer wrote:

Am 12.05.2010 09:59, schrieb Wolfgang Lux:
Author: wlux
Date: Wed May 12 09:59:57 2010
New Revision: 30361

URL: http://svn.gna.org/viewcvs/gnustep?rev=30361&view=rev
Log:
Fix bug where some objects loaded from a .nib file were not sent an
-awakeFromNib message.

Modified:
    libs/gui/trunk/ChangeLog
    libs/gui/trunk/Source/GSNibLoading.m

Hi Wolfgang,

are you sure this new code is correct now? I changed that same code
backwards and forwards a few time in March and your change could break
things for Doug again. (See our mails from March, 25th on the GNUstep
developer mailing list) If I remember correctly the problem Doug had at
that time was that my change resulted in the NIB owner not getting a
awakeFromNib message call.

I'm not absolutely sure that the new code now is correct, but the old
code for sure was incorrect as some nib objects (in my particular case
some submenus of the main menu) definitely were not sent an awakeFromNib message. If the nib owner does not receive an awakeFromNib, I guess that
we have to fix the nib loader to send this message explicitly to the
owner. If so, should this be done before or after awakening the other
objects?

Update: Thanks for making me aware of the issue with the owner, which indeed was no longer sent an -awakeFromNib message. Investigating things a bit further revealed that your change in r30018 to iterate over the _objects map instead of the _names map essentially was correct and I now have restored it together with an explicit - awakeFromNib sent to the owner after all other objects have been woken (which seems to happen on Cocoa -- at least according to my limited tests).

Somehow the way Apple uses the names and objects maps in the NIB format is hard to understand. If we ever get it right here, we then should have
a look at the XIB loading, this surely is broken as well.


Indeed, it just took me a while longer to get this (hopefully) right
because I first had to find out a way to enumerate all objects contained
in the xib file (commit r30365).

Turns out that there are more issues with xib loading. I guess it will take me a bit longer to fix things here (without any claim of getting things right ;-).

Wolfgang




reply via email to

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