I just started a new Cocoa project after a long time ... And I donβt know why, but I always get an error when calling xib using NSWindowController. What I'm doing is very simple: I have a new project as a starting point, and then I don't want to call xib from Appdelegate, but from a subclass of NSWindowController. Then the output tells me that:
2014-11-12 09: 58: 18.519 SimpleTest [8554: 378690] ApplePersistence = NO
2014-11-12 09: 58: 18.671 SimpleTest [8554: 378690] Failed to connect (window) exit from (NSApplication) to (NSWindow): missing set or instance variable
Ok, how does it look in code? My Appdelegate is as follows:
Nothing special yet. MainWindowController as follows:
And again very simple ... Additiponally I have some changes in IB: File'Owner of MainMenu.xib becomes MainWindowController . Its "window" outlet is connected to the application window. The window delegate is connected to the file owner. Well it! But why am I getting this error? What am I doing wrong?
--- EDIT --- this shows the connections in IB

source share