Re: windowDidLoad not getting called
Re: windowDidLoad not getting called
- Subject: Re: windowDidLoad not getting called
- From: Bill Cheeseman <email@hidden>
- Date: Thu, 19 Mar 2015 16:39:00 -0400
> On Mar 19, 2015, at 3:54 PM, Ken Thomases <email@hidden> wrote:
>
> That doesn't help with getting the window controller's -windowDidLoad method called. In fact, that setting almost never helps with anything and, in my opinion, should generally be off. Turning it on just takes control away from the window controller.
Doesn't everything in a nib file take control away from the file's owner? That's the point of a nib file. It's true that you can do programmatically most or all of what a nib file does using its checkboxes, but why would you want to punish yourself like that? -- unless, of course, you need unusually fine control over details that the nib file doesn't handle.
I believe you're mistaken when you say that the "Visible at Launch" setting doesn't result in a call to -windowDidLoad. I'm using it now in a rewrite of my UI Browser product, and it triggers -windowDidLoad exactly as I expected. I don't see anything in my code that would trigger it. When I turn off the nib setting the window does not appear at all, let alone call -windowDidLoad. I've been following the "Visible at Launch" story since at least 2002, and I don't recall ever hearing a suggestion that it doesn't trigger -windowDidLoad.
As far as I'm aware, the only thing that distinguishes the Visible at Launch setting from all of the other Interface Builder settings is that it got a bit of a bad name way back at the beginning because people misunderstood its (admittedly misleading) wording. It does not make a window visible when the application launches, except by coincidence if you happen to load the nib file then. That led a lot of early users to believe that the setting was broken. Its real meaning was eventually explained in an Interface Builder or Xcode tooltip on the setting, maybe 6 or 7 years ago. (In trying to read the tooltip now, in Xcode 6.2, I see that there is no tooltip for this setting, although there is a tooltip for all the settings above and below it. Now that is really wierd!)
--
Bill Cheeseman - 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