• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: connections and the nib lifecycle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: connections and the nib lifecycle
      • From: Jonathan Hess <email@hidden>
References: 
 >connections and the nib lifecycle (From: Torsten Curdt <email@hidden>)
 >Re: connections and the nib lifecycle (From: Vijay Malhan <email@hidden>)
 >Re: connections and the nib lifecycle (From: Torsten Curdt <email@hidden>)

  • Prev by Date: Re: Programmatically get treecontroller selection
  • Next by Date: Trying to understand -- please help...
  • Previous by thread: Re: connections and the nib lifecycle
  • Next by thread: Re: connections and the nib lifecycle
  • Index(es):
    • Date
    • Thread