Here's what i did.
I went to the appDelegate.h file and did
`-@Property (assign) IBOutlet NSViewController *popVC;
Then i went to the applicationDidFinishLaunching:
method and did
popVC = [[NSViewController alloc] init];
Result: I get the following error message:
Shouldnt objects on a nib be weak since it is already owned by the nib?
Outlets to view controllers should be strong
. The NIB doesn't own the objects, its just an archive. Outlets to views should usually be weak
but that's because the view is retained by its superview (the superview is usually retained by its view controller).
As an aside, you shouldn't be doing:
popVC = [[NSViewController alloc] init];
Because popVC
is being unarchived, created and set when the NIB is loaded. By creating and setting an instance yourself you're throwing the NIB version away. This applies to all outlets - the purpose of an outlet I'd to be filled in when a NIB is loaded.