Re: connections and the nib lifecycle
Re: connections and the nib lifecycle
- Subject: Re: connections and the nib lifecycle
- From: Vijay Malhan <email@hidden>
- Date: Thu, 22 May 2008 00:05:22 +0530
Yes you are right. If we see this as an optimization enhancement, it
completely make sense to have things work like this. But my point is
that this behavior is not in-sync with the Leopard framework
documentation (XCode 3.0) and Tiger implementation. Following is
extract from the Mac OS X 10.5 SDK reference for awakeFromNib method.
- (void)awakeFromNib
Discussion
An awakeFromNib message is sent to each object loaded from the
archive, but only if it can respond to the message, and only after all
the objects in the archive have been loaded and initialized. When an
object receives anawakeFromNib message, it is guaranteed to have all
its outlet instance variables set.
Now with this new behavior, developer will not know, where exactly it
should expect it's UI element to be loaded for sure? And this will
also break the code written in Tiger, when run on Leopard. So for now,
it's a bug according to me.
- Vijay
On 21-May-08, at 11:14 PM, Torsten Curdt wrote:
...actually with this new lazy loading feature code like this
- (IBAction) showPreferences:(id)sender
{
if (!preferencesController) {
preferencesController = [[PreferencesController alloc] init];
}
[preferencesController showWindow:self];
}
could probably just go away and become
- (IBAction) showPreferences:(id)sender
{
[preferencesController showWindow:self];
}
with the alloc in the parent's init method.
...or am I mistaken? Or is that a bug?
cheers
--
Torsten
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden