Re: Creating NSViewController with -init.
Re: Creating NSViewController with -init.
- Subject: Re: Creating NSViewController with -init.
- From: Keary Suska <email@hidden>
- Date: Tue, 25 Mar 2014 12:08:02 -0600
On Mar 25, 2014, at 9:29 AM, Kyle Sluder wrote:
> On Mar 25, 2014, at 7:22 AM, Keary Suska <email@hidden> wrote:.
>>
>>
>> The argument name tells it all: "nibNameOrNil" says that nil is a acceptable option. Why would it be named thus if a nil value would throw an exception?
>
> Nobody said the initializer should throw an exception.
I was responding to the OP, who seemed to believe that the docs were saying exactly this, which was the basis of his query, as I understand. Perhaps I misunderstood the OP's question?
> But -loadView is documented to throw an exception if a nil nib name was passed to the designated initializer. There is no reason to assume -init will pass anything but nil to the designated initializer.
Yes, and yes, but also it is documented to not throw an exception is setView: is used before the view is loaded, which the OP must be using to avoid the exception.
Best,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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