Re: Is windowControllerDidLoadNib used only when windowNibName is?
Re: Is windowControllerDidLoadNib used only when windowNibName is?
- Subject: Re: Is windowControllerDidLoadNib used only when windowNibName is?
- From: Daryle Walker <email@hidden>
- Date: Sun, 26 Jun 2016 03:05:19 -0400
> On Jun 10, 2016, at 9:45 AM, Jerry Krinock <email@hidden> wrote:
>
>> On 2016 Jun 10, at 06:16, Daryle Walker <email@hidden> wrote:
>>
>> I replaced windowNibName with makeWindowControllers since I'm moving window management to a separate controller. I kept windowControllerDidLoadNib around. Now I wondered if it still gets called. I put in a "print( #function + "got called." )" and never saw the output. Is this method called only when the default NIB-in-NSDocument strategy is used?
>
> The -windowControllerDidLoadNib: documentation states the reason for this, that it is called "if the receiver is the nib file’s owner”. So, check what is your nib File’s Owner.
>
> I usually don’t get it either, because I like to set as owner of my document nib files a window controller, and not the associated document.
I’m using storyboards, which changes the “NIB file’s owner” to a reference to the window/view controller. So does this mean I can remove “- windowControllerDidLoadNib”?
—
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com
_______________________________________________
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