Re: Properties being set to nil?


Sandor Szatmari
 

I’ve seen this happen if the view controller is instantiated in code and in the NIB (not sure about storyboards)

It gets hooked up correctly one time and things are nil in the other case. Are you subclassing NSViewController and setting it to the class of a view controller in your storyboard? If so, and your also instantiating the view controller in code you’ll see two initializations of the object. One will be good and the other may or may not.

Sandor

On Jan 16, 2020, at 12:20, Dave <dave@looktowindward.com> wrote:

Join cocoa@apple-dev.groups.io to automatically receive all group messages.